Skip to content

Automatic prefix on text fields should index offsets and term vectors if they are activated on the parent field #28994

@jimczi

Description

@jimczi

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search/SearchSearch-related issues that do not fall into other categories>enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions