Hello,
I'm trying to use the new feature described here:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-reverse-nested-aggregation.html#search-aggregations-bucket-reverse-nested-aggregation
I have a structure similar to the one described in the nested aggregation
example :
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-nested-aggregation.html
For one product I have several resellers so I want to know the minimum
price for each product.
I tried this search, similar to the documentation example:
GET /products/_search
{
"query": {
"match_all": {}
},
"aggs": {
"offers": {
"nested": {
"path": "offers"
},
"aggs": {
"min_price": {
"min": {
"field": "offers.price"
}
},
"aggs": {
"offers_to_product": {
"reverse_nested": {
"path": "offers"
},
"aggs": {
"productId_per_offer": {
"terms": {
"field": "id"
}
}
}
}
}
}
}
}
}
I have a parsing error:
Caused by: org.elasticsearch.search.SearchParseException: [products][4]:
query[ConstantScore(:)],from[-1],size[-1]: Parse Failure [Could not find
aggregator type [offers_to_product] in [aggs]]
at
org.elasticsearch.search.aggregations.AggregatorParsers.parseAggregators(AggregatorParsers.java:128)
at
org.elasticsearch.search.aggregations.AggregatorParsers.parseAggregators(AggregatorParsers.java:120)
at
org.elasticsearch.search.aggregations.AggregatorParsers.parseAggregators(AggregatorParsers.java:77)
at
org.elasticsearch.search.aggregations.AggregationParseElement.parse(AggregationParseElement.java:60)
What is wrong with my request?
Thank you,
Stephan
--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8e02b4aa-606a-477d-bb2a-e0e02ee9a7a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.