Use the analyzer clause to control which analyzer the query engine applies to each field at query time. The system converts field values to terms using the analyzers you specify, overriding any schema-level defaults on a per-field basis.
The analyzer clause is optional. Omit it to use the analyzers defined in the index schema.
Syntax
{
"analyzer": {
}
}Each key inside analyzer is an index field name; the value is the analyzer assigned to that field.
Parameters
| Parameter | Description |
|---|---|
no_tokenize_indexes | Fields whose values the query engine should not convert to terms. Other text processing — such as normalization and stop word filtering — still applies. Use this parameter for all analyzers except keyword. |
specific_index_analyzer | A per-field analyzer override. Takes higher priority than the analyzer defined in the index schema. Analyzers specified here must be defined in analyzer.json. Use this parameter to assign the keyword analyzer to a field. |
Example
The following example assigns a different analyzer to each field in the query:
{
"analyzer": {
"title": "chn_standard",
"description": "single",
"category": "fuzzy",
"uid": "keyword"
}
}该文章对您有帮助吗?