Hi,
I'm pulling my hair out on this (and I don't have much left to pull out!)
We have a set of documents which are replicated to Elastic from Couchbase.
We're new to Elastic, so feel free to say "Why are you doing this, this is a better way" (so long as it's constructive )
in the document, we have a "holiday product", this product has a nested array of "prices", this price object contains fields such as number of passengers, date, promo code, price etc. For each holiday product, this list of prices can be very long as there can be hundreds/thousands of permutations.
When running a query against the data, we don't want to carry the 1000's of lines of data over the wire (can be >5MB) so are trying to use inner_hits to only return the rows that match. (approx 10KB)
we have a query such as:
{
"_source": false,
"query": {
"nested": {
"path": "doc.products.calculatedPrices",
"score_mode": "avg",
"query": {
"bool": {
"must": [
{ "match": { "doc.products.calculatedPrices.promoCode": "DRH725C" } },
{ "match": { "doc.products.calculatedPrices.pax": 2 } },
{ "range": { "doc.products.calculatedPrices.now" : {"gte": 100, "lte":120} } }
]
}
},
"inner_hits": {}
}
}
}
this generates the error:
{
"took": 41,
"timed_out": false,
"_shards": {
"total": 3,
"successful": 2,
"failed": 1,
"failures": [
{
"shard": 2,
"index": "testavail5",
"node": "AfXKKfqrSPqOrNO7mLreEQ",
"reason": {
"type": "index_out_of_bounds_exception",
"reason": "Index: 7290, Size: 134"
}
}
]
},
"hits": {
"total": 62,
"max_score": 5.845086,
"hits": []
}
}
On this test server, we are running a single node with 3 shards. so not sure why one share reports as failed.
if we change the
inner_hits": {}
to inner_hits": {"_source":false}
we get results but obviously don't get any useful information in the output!
Are we hitting a bug in ES 5.4 ? (or more likely) are we doing something stupid?
Thanks
Phil
(happy to post more snippets / logs etc as required - just didn't want to overload the post with too much info that might not be needed)