- Elasticsearch 7.0 Cookbook(Fourth Edition)
- Alberto Paro
- 60字
- 2021-06-24 14:52:13
How to do it...
Every core type field allows you to specify custom analyzer for indexing and for searching as field parameters.
For example, if we want the name field to use a standard analyzer for indexing and a simple analyzer for searching, the mapping will be as follows:
{
"name": {
"type": "string",
"index_analyzer": "standard",
"search_analyzer": "simple"
}
}