Ajm/fix 2585 ignore missing lexical - #2587
Merged
Merged
Conversation
if the user did not ask for lexical sort explicitly for findAndRerank then allow collection to run without it
Contributor
📈 Unit Test Coverage Delta vs Main Branch
|
Contributor
Unit Test Coverage Report
|
erichare
requested changes
Sep 22, 2026
erichare
left a comment
Contributor
There was a problem hiding this comment.
One test that i believe needs to be updated, to address the DSE integration failure. Otherwise looks fantastic.
erichare
self-requested a review
September 22, 2026 19:19
Contributor
📈 Integration Test Coverage Delta vs Main Branch (dse69-it)
|
Contributor
Integration Test Coverage Report (dse69-it)
|
Contributor
📈 Integration Test Coverage Delta vs Main Branch (hcd-it)
|
Contributor
Integration Test Coverage Report (hcd-it)
|
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.
What this PR does:
If the user does not explicit (by using
$lexcial) request a lexical leg for findAndRerank and the collection does not have a lexical index do not return an error. We only return an error if the user actually asks for lexical and they do not have one.Added unit tests, verified via API below:
Create collection with lexcial and rerank disabled:
{ "createCollection": { "name": "rerank_no_lexical", "options": { "vector": { "metric": "cosine", "dimension": 1024, "service": { "provider": "openai", "modelName": "text-embedding-3-small" } }, "lexical": { "enabled": false }, "rerank": { "enabled": false } } } }Try findAndRerank without model override fails as expected:
{ "findAndRerank": { "filter": {}, "projection": {}, "sort": { "$hybrid": "I like cheese!" }, "options": { "limit": 20, "includeScores": true, "includeSortVector": false } } } { "errors": [ { "id": "ebab6334-2f9a-4003-a2fe-c1f5f093f207", "family": "REQUEST", "scope": "SCHEMA", "errorCode": "RERANKING_FEATURE_NOT_ENABLED", "title": "Reranking feature not enabled", "message": "Reranking feature is not enabled for this database." } ] }Then with a model override, the command tries to execute and sees it needs an embedding key (because open AI was used). This means it started running the command:
{ "findAndRerank": { "filter": {}, "projection": {}, "sort": { "$hybrid": "I like cheese!" }, "options": { "limit": 20, "includeScores": true, "includeSortVector": false, "rerank": { "provider": "nvidia", "modelName": "nvidia/llama-3.2-nv-rerankqa-1b-v2" } } } } { "errors": [ { "id": "076fa39c-1d7b-480a-9d56-8657328799e9", "family": "SERVER", "scope": "EMBEDDING_PROVIDER", "errorCode": "EMBEDDING_PROVIDER_AUTHENTICATION_KEYS_NOT_PROVIDED", "title": "Authentication header(s) missing from embedding request", "message": "Missing authentication header(s) from embedding request (provider 'openai'): 'x-embedding-api-key' header is missing')." } ] }In attached full trace running the command above that failed...
trace.json
Confirmed that the resolver only added one inner read, not 2:
Which issue(s) this PR fixes:
Fixes #2585
Checklist