One property with mapping "type": "string" and value "ReadingWonders2.0" is causing inconsistent query results.
It seems to be analyzed inconsistently. When I query using match, I get a different number of hits each time I run the query.
If I use a term filter for both the original string and what _analyze reports is the tokenized string, I get consistent results (same hits count each time I run the query) so it seems that some documents are being analyzed one way, and some the other...
query returning inconsistent results:
{
"query": {
"match": {
"edApp.name": "ReadingWonders2.0"
}
}
}
hits.total values when running query multiple times: [44, 56, 57, 69]
term query returning inconsistent results:
{
"query": {
"bool": {
"should": [
{
"term": {
"edApp.name": "ReadingWonders2.0"
}
}
]
}
}
}
hits.total values when running term query multiple times: [21, 33, 34, 46]
Other term query returning inconsistent results (note lower case):
{
"query": {
"bool": {
"should": [
{
"term": {
"edApp.name": "readingwonders2.0"
}
}
]
}
}
}
hits.total values when running term query multiple times: [44, 56, 57, 69]
NOTE: these are the same counts we saw with the match query!
query with both terms:
{
"query": {
"bool": {
"should": [
{
"term": {
"edApp.name": "readingwonders2.0"
}
},
{
"term": {
"edApp.name": "ReadingWonders2.0"
}
}
]
}
}
}
hits.total values are consistent: 79 results
The combined hits from lowercase, and camelcase term searches add up to the total 79 documents.
Any ideas why the match query is not finding some of the documents?
Using ES 1.5.2 through AWS Elasticsearch Service