I got a strange query result with the Polish analyzer (Stempel (Polish) Analysis plugin)
Here is the issue :
Use the Polish analyzer to index a document that contains in one of the fields the text "SIERPOWY Baton Energia #girl weganskie cudo #girl" :
{
"_index" : "fts-polish",
"_type" : "Document",
"_id" : "bool3",
"_source" : {
"_analyzer" : "polish",
"message" : "SIERPOWY 7:19 Baton Energia #girl weganskie cudo #girl"
}
}
Run the following query :
{
"from" : 0,
"size" : 50,
"query" : {
"bool" : {
"should" : [{
"match" : {
"_all" : {
"query" : "value",
"type" : "boolean"
}
}
}
]
}
},
"highlight" : {
"pre_tags" : [
"<b>"
],
"post_tags" : [
"</b>"
],
"fragment_size" : 0,
"number_of_fragments" : 0,
"fields" : {
"*" : {}
}
}
}
You expect not to find anything, because the word "value" is not in the text, but you get the record that you indexed above, with the word "girl" highlighted :
{
"took" : 11,
"timed_out" : false,
"_shards" : {
"total" : 170,
"successful" : 165,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 0.13561106,
"hits" : [{
"_index" : "fts-polish",
"_type" : "Document",
"_id" : "bool2",
"_score" : 0.13561106,
"_source" : {
"_analyzer" : "polish",
"streamId" : 1,
"language" : "Polish",
"message" : "SIERPOWY Baton Energia #girl weganskie cudo #girl"
},
"highlight" : {
"message" : [
"SIERPOWY Baton Energia #<b>girl</b> weganskie cudo #<b>girl</b>"
]
}
}
]
}
}
Any ideas?