Hi all,
Basically, I have an index with two document types 'foo' and 'bar'.
I have a query such that find all 'bar' with 'testColumn1' as 123 and 'foo' with 'testColumn1' in nested object 'nestedObj' as 123.
(nestedObj is basically 'bar' type object within 'foo' in the denormalized schema.)
The problem is that the output is different based on sequence of document types in the 'GET' request.
GET /bar,foo/_search
produces output with both 'foo' and 'bar' type results, but if the sequence is changed to:
GET /foo,bar/_search
then it output only contains 'foo' type results. There are no results of type 'bar' in this case.
My query:
{
"size" : 1000,
"query" : {
"bool" : {
"minimum_number_should_match": 1,
"should" : [ {
"filtered" : {
"filter" : {
"and" : {
"filters" : [ {
"term" : {
"nestedObj.testColumn1" : "123"
}
}, {
"type" : {
"value" : "foo"
}
} ]
}
}
}
},
{
"filtered" : {
"filter" : {
"and" : {
"filters" : [ {
"term" : {
"testColumn1" : "123"
}
}, {
"type" : {
"value" : "bar"
}
} ]
}
}
}
}]
}
Any ideas on why this could be happening?
Thanks!