Annotated text type should extend TextFieldType#49555
Annotated text type should extend TextFieldType#49555romseygeek merged 1 commit intoelastic:masterfrom
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. |
jimczi
left a comment
There was a problem hiding this comment.
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 |
markharwood
left a comment
There was a problem hiding this comment.
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
TextFieldTypeinstead,adding tests to ensure that position queries work correctly.
Closes #49289