-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Fix knn search error when dimensions are not set #131081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix knn search error when dimensions are not set #131081
Conversation
Hi @carlosdelest, I've created a changelog YAML for you. |
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
💔 Backport failed
You can use sqren/backport to manually backport by running |
* Unmute tests muted in elastic#129550 as they were fixed in elastic#127322 * Return no match when no dimensions have been set * Add tests * Update docs/changelog/131081.yaml (cherry picked from commit bbc4cef) # Conflicts: # server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java # x-pack/plugin/esql/qa/testFixtures/src/main/resources/knn-function.csv-spec
* Unmute tests muted in elastic#129550 as they were fixed in elastic#127322 * Return no match when no dimensions have been set * Add tests * Update docs/changelog/131081.yaml (cherry picked from commit bbc4cef) # Conflicts: # server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java # server/src/main/java/org/elasticsearch/search/SearchFeatures.java # x-pack/plugin/esql/qa/testFixtures/src/main/resources/knn-function.csv-spec
* Unmute tests muted in elastic#129550 as they were fixed in elastic#127322 * Return no match when no dimensions have been set * Add tests * Update docs/changelog/131081.yaml (cherry picked from commit bbc4cef) # Conflicts: # server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java # server/src/main/java/org/elasticsearch/search/SearchFeatures.java # x-pack/plugin/esql/qa/testFixtures/src/main/resources/knn-function.csv-spec
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
* Unmute tests muted in elastic#129550 as they were fixed in elastic#127322 * Return no match when no dimensions have been set * Add tests * Update docs/changelog/131081.yaml (cherry picked from commit bbc4cef) # Conflicts: # server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java # server/src/main/java/org/elasticsearch/search/SearchFeatures.java # x-pack/plugin/esql/qa/testFixtures/src/main/resources/knn-function.csv-spec
* Unmute tests muted in #129550 as they were fixed in #127322 * Return no match when no dimensions have been set * Add tests * Update docs/changelog/131081.yaml (cherry picked from commit bbc4cef) # Conflicts: # server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java # x-pack/plugin/esql/qa/testFixtures/src/main/resources/knn-function.csv-spec
* Unmute tests muted in #129550 as they were fixed in #127322 * Return no match when no dimensions have been set * Add tests * Update docs/changelog/131081.yaml (cherry picked from commit bbc4cef) # Conflicts: # server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java # server/src/main/java/org/elasticsearch/search/SearchFeatures.java # x-pack/plugin/esql/qa/testFixtures/src/main/resources/knn-function.csv-spec
* Unmute tests muted in elastic#129550 as they were fixed in elastic#127322 * Return no match when no dimensions have been set * Add tests * Update docs/changelog/131081.yaml
* Unmute tests muted in elastic#129550 as they were fixed in elastic#127322 * Return no match when no dimensions have been set * Add tests * Update docs/changelog/131081.yaml
A KNN search that uses similarity when no dimensions are set for a dense_vector field caused a NPE when calculating similarity:
Having no dimensions set on a dense_vector field means that no data has been ingested yet, so we can shortcut to use a
MatchNoDocsQuery
in this case.Closes #129550