1. Docs

Index Prefixes

The index_prefixes parameter enables the indexing of term prefixes to allow for prefix searches. It accepts the following settings:

  • min_chars (Optional, integer) The minimum prefix length to index. Must be greater than 0, and defaults to 2. The value is inclusive.
  • max_chars (Optional, integer) The maximum prefix length to index. Must be at least min_chars and defaults to 5. The value is inclusive.
JSON
{ "mappings": { "properties": { "full_name": { "type": "text", "index_prefixes": { "min_chars" : 1, "max_chars" : 10 } } } } }

Was this page helpful?