Skip to content

Add integration test for score_threshold in Formula queries#8098

Closed
Copilot wants to merge 4 commits intodevfrom
copilot/sub-pr-8097
Closed

Add integration test for score_threshold in Formula queries#8098
Copilot wants to merge 4 commits intodevfrom
copilot/sub-pr-8097

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

Added integration test to verify score_threshold parameter correctly filters results in Formula queries.

Changes

  • New test: test_formula_with_score_threshold in tests/openapi/test_query_formula.py
    • Verifies threshold filtering at two boundary conditions (above/below 2nd highest score)
    • Validates all returned scores meet threshold requirement
    • Uses same fixture pattern as existing formula tests
query = {
    "prefetch": {"query": point_id},
    "query": {"formula": formula, "defaults": {"price": 0.0}},
    "score_threshold": threshold_value,
}

The test ensures the existing score_threshold handling in lib/segment/src/segment/formula_rescore.rs works correctly end-to-end.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 10, 2026 17:42
Co-authored-by: generall <1935623+generall@users.noreply.github.com>
…t JSON parsing

Co-authored-by: generall <1935623+generall@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix handling of score threshold in Formula queries Add integration test for score_threshold in Formula queries Feb 10, 2026
Copilot AI requested a review from generall February 10, 2026 17:45
Base automatically changed from fix-formula-score-threshold to dev February 10, 2026 20:28
@coszio
Copy link
Contributor

coszio commented Feb 10, 2026

I already did an integration test right before in a97a20a, sorry!

@coszio coszio closed this Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants