I am having a problem where "shirts" is not matching anything, even though there are many docs with the word "shirt" in the name field (and other fields). I know I am missing something really simple but I can't figure out what. These are my settings:
"analysis" : { "filter" : { "english_stemmer" : { "type" : "stemmer", "language" : "english" }, "english_stop" : { "type" : "stop", "stopwords" : "_english_" }, "english_possessive_stemmer" : { "type" : "stemmer", "language" : "possessive_english" } }, "analyzer" : { "english" : { "filter" : [ "english_possessive_stemmer", "lowercase", "english_stop", "english_stemmer", "asciifolding" ], "tokenizer" : "standard" } } }
and when I test analyze the word "shirts":
curl -XGET 'http://localhost:9200/shop/_analyze?analyzer=english&text=shirts&pretty=1'
{ "tokens" : [ { "token" : "shirt", "start_offset" : 0, "end_offset" : 6, "type" : "<ALPHANUM>", "position" : 0 } ] }
..looks good. But my query doesn't return results!
`
curl -XGET 'http://localhost:9200/shop/_search?explain=1&fields=skuid&from=0&pretty=1&size=18' -d '
{
"query" : {
"match" : {
"name" : {
"query" : "shirts"
}
}
}
}
'
[Thu Jun 23 19:30:22 2016] # Response: 200, Took: 66 ms
# {
# "hits" : {
# "hits" : [],
# "max_score" : null,
# "total" : 0
# },
# "timed_out" : false,
# "_shards" : {
# "failed" : 0,
# "successful" : 5,
# "total" : 5
# },
# "took" : 19
# }
`