Skip to content

Update Semantic Query To Handle Zero Size Responses #116277

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

Merged
merged 13 commits into from
Nov 18, 2024

Conversation

Mikep86
Copy link
Contributor

@Mikep86 Mikep86 commented Nov 5, 2024

Addresses #116083. If a semantic_text field uses dense embeddings, 0-size search responses cause an error due to an invalid value for k in the underlying knn query. Fixed the issue by ensuring that k is set to at least 10 in this case.

@Mikep86 Mikep86 added >bug auto-backport Automatically create backport pull requests when merged :Search Relevance/Vectors Vector search :SearchOrg/Relevance Label for the Search (solution/org) Relevance team v9.0.0 v8.16.1 v8.17.0 v8.15.5 labels Nov 5, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-eng (Team:SearchOrg)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-relevance (Team:Search - Relevance)

@elasticsearchmachine
Copy link
Collaborator

Hi @Mikep86, I've created a changelog YAML for you.

@Mikep86
Copy link
Contributor Author

Mikep86 commented Nov 5, 2024

@elasticmachine update branch

@elasticsearchmachine
Copy link
Collaborator

Hi @Mikep86, I've updated the changelog YAML for you.

@Mikep86 Mikep86 requested a review from benwtrent November 18, 2024 16:05
@Mikep86 Mikep86 requested a review from jimczi November 18, 2024 16:05
@Mikep86 Mikep86 merged commit 29659fd into elastic:main Nov 18, 2024
16 checks passed
Mikep86 added a commit to Mikep86/elasticsearch that referenced this pull request Nov 18, 2024
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.16
8.x
8.15 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 116277

@Mikep86
Copy link
Contributor Author

Mikep86 commented Nov 18, 2024

💚 All backports created successfully

Status Branch Result
8.15

Questions ?

Please refer to the Backport tool documentation

Mikep86 added a commit to Mikep86/elasticsearch that referenced this pull request Nov 18, 2024
(cherry picked from commit 29659fd)

# Conflicts:
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferenceFeatures.java
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java
#	x-pack/plugin/inference/src/yamlRestTest/resources/rest-api-spec/test/inference/40_semantic_text_query.yml
elasticsearchmachine pushed a commit that referenced this pull request Nov 18, 2024
…116983)

* Update Semantic Query To Handle Zero Size Responses (#116277)

(cherry picked from commit 29659fd)

# Conflicts:
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferenceFeatures.java
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java
#	x-pack/plugin/inference/src/yamlRestTest/resources/rest-api-spec/test/inference/40_semantic_text_query.yml

* Fix spotless error
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Nov 20, 2024
alexey-ivanov-es pushed a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged >bug :Search Relevance/Vectors Vector search :SearchOrg/Relevance Label for the Search (solution/org) Relevance team v8.15.5 v8.16.1 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants