-
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
Annotated text type should extend TextFieldType #49555
Conversation
Pinging @elastic/es-search (:Search/Mapping) |
Had a quick look and I'm not sure about compatibility with intervals. How would an interval query work with this field value with a mixed-case annotation: I can't use a
If that's opening a can of worms maybe we can separate the "make interval queries work with annotations" into a different PR. |
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
If that's opening a can of worms maybe we can separate the "make interval queries work with annotations" into a different PR.
+1 to address this in a follow up.
@markharwood you can specify an analyzer for an intervals |
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 - thanks, @romseygeek
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
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 beenoverridden, 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