Phonetic analysis on elasticsearch 2.1.1


#1

What can be some reasons that a phonetic-analysis query on elasticsearch 2.1.1 (with the proper phonetic plugin) does not return any hits while it does return hits on the same data and index settings on elasticsearch 1.6?

BTW - using the Inquisitor plugin I can see that my english_phonetic analyzer on 2.1.1 does the proper phonetic tokenization and coding. Maybe the query should be different?

Here is my query. It is supposed to find "Asia" and "America" in the text:

{
  "size" : 50,
  "query" : {
    "bool" : {
      "must" : {
        "bool" : {
          "must" : [ {
            "bool" : {
              "should" : [ {
                "match" : {
                  "_all" : {
                    "query" : "ashya",
                    "type" : "boolean",
                    "analyzer" : "english_phonetic"
                  }
                }
              }, {
                "match" : {
                  "_all" : {
                    "query" : "ashya",
                    "type" : "boolean",
                    "analyzer" : "default_search"
                  }
                }
              }, {
                "match" : {
                  "_all" : {
                    "query" : "ashya",
                    "type" : "phrase",
                    "analyzer" : "simple"
                  }
                }
              } ]
            }
          }, {
            "bool" : {
              "should" : [ {
                "match" : {
                  "_all" : {
                    "query" : "amereaka",
                    "type" : "boolean",
                    "analyzer" : "english_phonetic"
                  }
                }
              }, {
                "match" : {
                  "_all" : {
                    "query" : "amereaka",
                    "type" : "boolean",
                    "analyzer" : "default_search"
                  }
                }
              }, {
                "match" : {
                  "_all" : {
                    "query" : "amereaka",
                    "type" : "phrase",
                    "analyzer" : "simple"
                  }
                }
              } ]
            }
          } ]
        }
      }
    }
  },
  "post_filter" : {
    "term" : {
      "_type" : "Document"
    }
  },
  "highlight" : {
    "pre_tags" : [ "<b>" ],
    "post_tags" : [ "</b>" ],
    "fragment_size" : 0,
    "number_of_fragments" : 0,
    "fields" : {
      "WordA" : { },
      "WordB" : { },
      "WordC" : { },
      "message" : { },
      "user" : { }
    }
  }
}

#2

Solved: the default indexing analyzer settings were wrong...


(system) #3