How does the match_phrase work for a field with different search_analyzer/index_analyzer?

(Ivan Ji) #1

Hi, all

The problem is I have an document field whose search analyzer is
"fielda_search" and index analyzer is "fielda_index".

I cannot use the exact term to find the document.

here is the gist to reproduce the situation:

My example document is "{"name": "Canon PowerShot D500"}".

The two token set of the two analyzers are:

fielda_indexCanon 1PowerShot 2Power 2Shot 3D500 4D 4500 5fielda_searchCanon
1PowerShot 2D500 3D 3500 4

Obviously, it's different. But the token of the search analyzer are all
included in the index analyzer. why it cannot be found by match_phrase?

If I change the search_analzyer to be the same one of index_analyzer, the
match_phrase can find the document.

So what is the problem? And what is the rule of match_phrase? Does it need
to match all the tokens to be exact same ?

BTW, I am using ES 1.0.1.

Any idea?



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