Elasticsearch engines text field conventions

Elasticsearch engines text field conventionsedit

All of your text fields are available when querying an Elasticsearch engine. However, you may want to define additional subfields for each text field in your index. These additional subfields are called multi fields, and they allow you to store the same values, using different analyzers. Using multiple analyzers allows you to analyze the same field in different ways to improve search relevance.

To use precision tuning, you must define subfields for each text field, according to the naming conventions below. To customize precision tuning for your use case, configure text analysis for your subfields.

See Analyzers for additional information on the analyzers provided by Enterprise Search for managed engines.

App Search uses the following naming conventions to define subfields for each text field:

Field name Relevance tuning max value Used for phrase queries Used in fuzzy queries Highlight available Used in suggestions / prefix

field

All

No

No

No

No

field.prefix

8

No

No

Yes

Yes

field.delimiter

8

No

No

No

No

field.joined

9

No

No

No

No

field.stem

10

Yes

Yes

Yes

No

The table refers to the following capabilities for each text subfield:

  • Field name: Text subfield name
  • Relevance tuning max value: Used when precision tuning value is equal to the specified value, or less.
  • Used for phrase queries: Used in match phrase queries to Elasticsearch as part of a full text search. Terms will score higher when close to each other.
  • Used in fuzzy queries: Used in fuzzy queries to Elasticsearch as part of a full text search. Fuzzy queries allow for typo tolerance.
  • Highlight available: Used for result fields highlighting
  • Used in suggestions / prefix: Used in Query Suggestions as well as full text searches.

For example, given a text field named address, a subfield named address.stem would be:

In summary:

  • The base text field is used in all text queries
  • prefix subfield is used for suggest queries and supports highlighting. Use this field for suggestions and autocomplete style queries.
  • delimiter and joined subfields are not used in fuzzy queries, phrase queries or suggestions. They will be used to match individual terms with no default typo tolerance. You should provide additional analyzers for these fields, to enable customized query relevance. For example, you can use these fields to remove specific characters from your document words (like delimiters), or provide n-grams for partial matches.
  • stem subfield is used in phrase and fuzzy queries, and support highlighting. This subfield will enable typo tolerance by default. Use it to provide custom stemming for your queries.