Hi :
I have the following query :
{
"query": {
"bool": {
"must": {
"nested": {
"query": {
"bool": {
"must": [
{
"match": {
"NESTED_FIELD.v": {
"query": [ "AAPL.OQ", "GOOGL.OQ"],
"operator": "and"
}
}
},
{
"range": {
"NESTED_FIELD.s": {
"from": 0.6,
"to": null,
"include_lower": true,
"include_upper": true
}
}
}
]
}
},
"path": "NESTED_FIELD"
}
}
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"DOC_DATE.v": {
"from": "2014-08-19T20:00:00.000-04:00",
"to": "2014-10-18T23:59:59.999Z",
"include_lower": true,
"include_upper": true
}
}
}
]
}
}
}
The behavior I expect is the following :
In the documents that are returned, they should contain both values for
the NESTED_FIELD.v (AAPL.OQ and GOOG.OQ) that satisfy the condition where
their corresponding NESTED_FIELD.v range also is satisfied.
The behavior I see :
the documents returned contain either one of the values (as in its got
AAPL.OQ (OR) GOOG.OQ (OR) Both.
I want documents that only have both the values. So the "operator" :"and"
(and its variant "operator":"AND") does not seem to have any effect.
any pointers suggestions regarding this is much appreciated. I am using the
JAVA API to construct my queries. (but I do not think it should matter)
Thanks
Ramdev
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/c07cc19b-9ff1-4074-b79c-1861afb7e866%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.