OpenSearch/docs/reference/mapping
Alan Woodward 424ecb3c7d
Add ability to index prefixes on text fields (#28290)
This adds the ability to index term prefixes into a hidden subfield, enabling prefix queries to be run without multitermquery rewrites. The subfield reuses the analysis chain of its parent text field, appending an EdgeNGramTokenFilter. It can be configured with minimum and maximum ngram lengths. Query terms with lengths outside this min-max range fall back to using prefix queries against the parent text field.

The mapping looks like this:

"my_text_field" : {
"type" : "text",
"analyzer" : "english",
"index_prefix" : { "min_chars" : 1, "max_chars" : 10 }
}

Relates to #27049
2018-01-30 08:26:56 +00:00
..
dynamic Allow `_doc` as a type. (#27816) 2017-12-14 17:47:53 +01:00
fields Allow `_doc` as a type. (#27816) 2017-12-14 17:47:53 +01:00
params Allow `_doc` as a type. (#27816) 2017-12-14 17:47:53 +01:00
types Add ability to index prefixes on text fields (#28290) 2018-01-30 08:26:56 +00:00
dynamic-mapping.asciidoc Allow `_doc` as a type. (#27816) 2017-12-14 17:47:53 +01:00
fields.asciidoc Remove the _all metadata field (#26356) 2017-08-28 17:43:59 +02:00
params.asciidoc Reorganize docs of global ordinals. (#24982) 2017-06-01 16:47:44 +02:00
removal_of_types.asciidoc Allow `_doc` as a type. (#27816) 2017-12-14 17:47:53 +01:00
types.asciidoc [Docs] Correct link target for datatype murmur3 (#27143) 2017-10-30 09:31:55 +01:00