Elasticsearch engines text field conventions
editElasticsearch engines text field conventions
editAll 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 |
---|---|---|---|---|---|
|
All |
No |
No |
No |
No |
|
8 |
No |
No |
Yes |
Yes |
|
8 |
No |
No |
No |
No |
|
9 |
No |
No |
No |
No |
|
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:
- Used for precision tuning levels less than or equal to 10
- Not used to create phrase queries as part of full text searches.
- Not used to create fuzzy queries as part of full text searches.
- Used for highlighting results.
- Not used for query suggestions.
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
andjoined
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.