-
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
Interval Query should work with Annotated Text Plugin #49289
Labels
Comments
cbuescher
added
:Search/Search
Search-related issues that do not fall into other categories
>enhancement
labels
Nov 19, 2019
Pinging @elastic/es-search (:Search/Search) |
Maybe @markharwood can comment on whether this field type restriction is there on purpose of if this can and should eventually be supported. |
romseygeek
added a commit
that referenced
this issue
Nov 26, 2019
The annotated text mapper has a field type that currently extends StringFieldType, which means that all the positional-related query factory methods need to be copied over from TextFieldType. In addition, MappedFieldType.intervals() hasn't been overridden, so you can't use intervals queries with annotated text - a major drawback, since one of the purposes of annotated text is to be able to run positional queries against annotations. This commit changes the annotated text field type to extend TextFieldType instead, adding tests to ensure that position queries work correctly. Closes #49289
romseygeek
added a commit
that referenced
this issue
Nov 26, 2019
The annotated text mapper has a field type that currently extends StringFieldType, which means that all the positional-related query factory methods need to be copied over from TextFieldType. In addition, MappedFieldType.intervals() hasn't been overridden, so you can't use intervals queries with annotated text - a major drawback, since one of the purposes of annotated text is to be able to run positional queries against annotations. This commit changes the annotated text field type to extend TextFieldType instead, adding tests to ensure that position queries work correctly. Closes #49289
This was referenced Feb 3, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature Request
elasticsearch version >= 7.4.2
In our use case we would like use the interval query on text fields of type annotated text. The interval query, however, throws an exception:
Can only use interval queries on text fields - not on [text] which is of type [annotated_text]"
The exception is thrown here
https://github.com/elastic/elasticsearch/blob/master/server/src/main/java/org/elasticsearch/index/mapper/MappedFieldType.java#L395
.Interval query: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-intervals-query.html.
Annotated Text Plugin: https://www.elastic.co/blog/search-for-things-not-strings-with-the-annotated-text-plugin
The text was updated successfully, but these errors were encountered: