Does ES support to use the analyzer which decided by _analyzer field in search?

(Ivan Ji) #1

Hi all,

Assume my schema is


"settings": {
"index": {
"analysis": {
"analyzer": {
"ik_analyzer": {
"tokenizer": "ik",
"filter": ["engram"]
"filter": {
"engram": {
"type": "edgeNGram",
"min_gram": 2,
"max_gram": 10
"mappings": {
"main": {
"_analyzer": {
"path": "analyzer_name"
"properties": {
"id": { "type": "string", "index": "analyzed"},
"id2": { "type": "string", "index": "analyzed", "analyzer": "ik_analyzer"},
"analyzer_name": { "type": "string", "index": "not_analyzed"}


I use the "_analyzer" to use different analyzer which is decided by the
"analyzer_name" field between documents.

When I use the "match query" during search for the "id" field, whose
analyzer is decided by the field of "analyzer_name", what's the search
analyzer to be used in this situation without explicitly specifying the
search analyzer?
And how to use the analyzer decided by the "analyzer_name" field to be the
search analyzer?

We know if I queried for the "id2" field, the search analyzer is decided by
the analyzer it used, that is "ik_analyzer".
But does ES support the functionality, using the same analyzer to search
with the analyzer at indexing, after setting the "_analyzer" ?




You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit

(system) #2