-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Make semantic text part of the text family #119792
Conversation
Hi @Mikep86, I've created a changelog YAML for you. |
"Field [" + fieldType.name() + "] of type [" + fieldType.typeName() + "] does not support match queries" | ||
"Field [" | ||
+ fieldType.name() | ||
+ "] of type [" | ||
+ fieldType.typeName() | ||
+ "] does not support " | ||
+ type.getQueryName() | ||
+ " queries" |
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.
I changed this error message because it is propagated through to Kibana when attempting to run a match_phrase
query on a semantic_text
field. Previously, the error message indicated that semantic_text
fields do not support match
queries, which was quite misleading.
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 but I will leave it for an ES|QL expert to 👍
@@ -63,24 +66,26 @@ public enum Type implements Writeable { | |||
/** | |||
* The text is analyzed and terms are added to a boolean query. | |||
*/ | |||
BOOLEAN(0), | |||
BOOLEAN(0, org.elasticsearch.index.query.MatchQueryBuilder.NAME), |
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.
Nitpick: Can we clean up imports a bit here, so we don't reference the full class name here?
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.
Can't, there's an inner class called MatchQueryBuilder
in MatchQueryParser
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.
Maybe break it out into a variable then?
@elasticmachine merge upstream |
Pinging @elastic/search-eng (Team:SearchOrg) |
Pinging @elastic/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!
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.
💔 Backport failed
You can use sqren/backport to manually backport by running |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
Co-authored-by: Ioana Tagirta <[email protected]> (cherry picked from commit 29e1bf9) # Conflicts: # x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/EsqlSpecTestCase.java # x-pack/plugin/esql/qa/testFixtures/src/main/resources/semantic_text.csv-spec
Update field caps to report semantic text as a text field. This change should allow semantic text to more easily integrate with both Kibana and ES|QL, in addition to other components that use field caps to determine how to query a field.