Fix knn search error when dimensions are not set#131081
Merged
carlosdelest merged 5 commits intoelastic:mainfrom Jul 11, 2025
Merged
Fix knn search error when dimensions are not set#131081carlosdelest merged 5 commits intoelastic:mainfrom
carlosdelest merged 5 commits intoelastic:mainfrom
Conversation
Collaborator
|
Hi @carlosdelest, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
benwtrent
approved these changes
Jul 11, 2025
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
carlosdelest
added a commit
to carlosdelest/elasticsearch
that referenced
this pull request
Jul 11, 2025
* 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
carlosdelest
added a commit
to carlosdelest/elasticsearch
that referenced
this pull request
Jul 11, 2025
* 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
carlosdelest
added a commit
to carlosdelest/elasticsearch
that referenced
this pull request
Jul 11, 2025
* 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
Member
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
carlosdelest
added a commit
to carlosdelest/elasticsearch
that referenced
this pull request
Jul 11, 2025
* 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
carlosdelest
added a commit
that referenced
this pull request
Jul 11, 2025
carlosdelest
added a commit
that referenced
this pull request
Jul 11, 2025
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jul 14, 2025
* 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
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jul 14, 2025
* 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
mridula-s109
pushed a commit
to mridula-s109/elasticsearch
that referenced
this pull request
Jul 17, 2025
* 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
mridula-s109
pushed a commit
to mridula-s109/elasticsearch
that referenced
this pull request
Jul 17, 2025
* 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
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.
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
MatchNoDocsQueryin this case.Closes #129550