Hi,
Below is ES-2.3 query which returns 2 records but same query is returning all index records (documents). What could be causing this behavior?
- Index schema is same in both versions (2.3 and 5.5) [ so analyzer are same ]
- If filter clause is not supported in es-5.5, i was expecting this query should throw error. but query executes just fine, it returns all rows though.
- plane bool query to search these two products also returns all records, instead it should return only two values.
get test-index/_search
{
"_source": [],
"query": {
"filtered": {
"query": {
"bool": {
"should": [
{
"term": {
"_id": "product123"
}
},
{
"term": {
"_id": "product456"
}
}
]
}
}
}
},
"post_filter": {
"bool": {
"must": []
}
},
"sort": [
{
"priority": {
"order": "asc"
}
}
],
"size": 100,
"from": 0,
"aggs": {
"filtered": {
"filter": {
"bool": {
"must": []
}
},
"aggs": {
"brand": {
"terms": {
"field": "manufacturer",
"size": 1000
}
},
"model": {
"terms": {
"field": "model",
"size": 1000
}
},
"searchableColor": {
"terms": {
"field": "searchableColors",
"size": 1000
}
},
"averageRating": {
"terms": {
"field": "rating",
"size": 1000
}
},
"dealBadge": {
"terms": {
"field": "dealBadge",
"size": 1000
}
},
"conditions": {
"terms": {
"field": "conditions",
"size": 1000
}
}
}
}
}
}
Thanks....