Fix AzureDocumentDB score threshold for EuclideanDistance - #56
Merged
adamsitnik merged 1 commit intoSep 28, 2026
Merged
adamsitnik merged 1 commit into
adamsitnik merged 1 commit into
Conversation
Contributor
Author
|
@dotnet-policy-service agree |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review comments remain, and the corrected behavior is covered by the restored conformance test.
Review effort: Lite
Findings: None
What changed in this PR
Fixes Azure DocumentDB score-threshold filtering for Euclidean distance and bumps the provider version to 1.0.1.
Changes:
- Uses
$ltefor Euclidean distance and$gtefor similarity scores. - Re-enables the score-threshold conformance test.
- Passes the configured distance function into threshold mapping.
| File | Description |
|---|---|
MEVD/test/AzureDocumentDB.ConformanceTests/DocumentDBDistanceFunctionTests.cs |
Re-enables score-threshold testing. |
MEVD/src/AzureDocumentDB/DocumentDBCollectionSearchMapping.cs |
Selects the threshold operator by distance function. |
MEVD/src/AzureDocumentDB/DocumentDBCollection.cs |
Passes the configured distance function to threshold mapping. |
MEVD/src/AzureDocumentDB/AzureDocumentDB.csproj |
Updates the provider version to 1.0.1. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
adamsitnik
approved these changes
Sep 28, 2026
adamsitnik
left a comment
Contributor
There was a problem hiding this comment.
The bug fix looks perfect, big thanks for providing it @Empiree !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For EuclideanDistance DocumentDB returns a distance, so the score threshold filter has to use $lte, not $gte. Now it picks operator by distance function, same as the Cosmos provider does
Removed the TestScoreThreshold override so the conformance test runs again. Tested locally with documentdb-local, it fails before the fix and passes after. Also bumped the provider version to 1.0.1
Fixes #6