-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
The new option index_prefix on text fields that automatically creates a sub-field to index edge-ngrams in order to speed up prefix queries does not check the index options of the parent field.
If offsets or term_vectors for instance are indexed in the parent text field, they will be omitted in the prefix sub-field. Currently this sub-field only indexes doc and disables all other options, this was done to make sure that this sub-field does not use extra disk space for features that won't be used by the query. Though it could be beneficial to apply the same options than the parent field if we want to use this sub-field for highlighting prefix queries. Currently highlighting prefix queries on a text field does not work in conjunction with this new option (we create a term query that targets a different field) but we want to handle this case in the future so it would be beneficial to create this sub-field with the index options set on the parent field if these options are used by the highlighters. This could speed up the prefix query highlighting since a prefix query on that field is a simple term query and since this feature has not been released yet we could also avoid BWC issue by adding these options in the first release of this feature (6.3).