Phrase Match Query Problem


(kayngee) #1

Hi Guys,

For some reason when I do the following Phrase Match query I do not get any
results does anyone mind explaining why this is happening?

Below one can find the mapping and query being used

"settings": {

 "analysis": {

     "filter": {

             "token_ngrams": {

             "min_shingle_size": 2,

                 "max_shingle_size": 4,

                 "type": "shingle"

         },

             "synoynm_filter": {

             "synonyms_path": ".. path ...",

                 "type": "synonym"

         }

     },

     "analyzer": {

         "title_analyzer": {

             "filter": ["standard", "lowercase", "asciifolding", 

"synoynm_filter", "porter_stem", "token_ngrams"],

                 "type": "custom",

                 "tokenizer": "standard"

         }

     }

 }

}

"match": {

 "_all": {

     "query": "CompassMD is a SaaS platform",

         "type": "phrase",

             "analyzer": "title_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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/86a59b42-8e7d-4a37-a2ab-91f2e85fb7e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(kayngee) #2

So I did some more digging into the problem and apparently the problem is
not with the Phase Query but with the Analyser being user on the _all
field. When an Analyser is specified no results are returned but when I
omit the Analyser I get the expected results.

So the question is what is exactly happening internally on the _all field
is it using the standard analyser? is it not analysed?

On Friday, 27 June 2014 10:38:39 UTC+2, Shawn Ritchie wrote:

Hi Guys,

For some reason when I do the following Phrase Match query I do not get
any results does anyone mind explaining why this is happening?

Below one can find the mapping and query being used

"settings": {

 "analysis": {

     "filter": {

             "token_ngrams": {

             "min_shingle_size": 2,

                 "max_shingle_size": 4,

                 "type": "shingle"

         },

             "synoynm_filter": {

             "synonyms_path": ".. path ...",

                 "type": "synonym"

         }

     },

     "analyzer": {

         "title_analyzer": {

             "filter": ["standard", "lowercase", "asciifolding", 

"synoynm_filter", "porter_stem", "token_ngrams"],

                 "type": "custom",

                 "tokenizer": "standard"

         }

     }

 }

}

"match": {

 "_all": {

     "query": "CompassMD is a SaaS platform",

         "type": "phrase",

             "analyzer": "title_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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4cf8962d-d18c-4ee8-964e-7f85882e1549%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3