I have following query working
query = {
"query": inner_query,
"filter": {"term": {"has_product": 1}},
"facets": {
"destination": {
"terms": {"field": "hotel.destination_facets.en"},
"facet_filter": {"term": {"has_product": 1}}
},
"hotel_class": {
"terms": {"field": "hotel_class"},
"facet_filter": {"term": {"has_product": 1}}},
"hotel_type": {
"terms": {"field": "hotel.hotel_type_facets.en"},
"facet_filter": {"term": {"has_product": 1}}}}}
but i want to add range facet for min_rate field, but when i have the
following query i have Elasticsearch parse error.
query = {
"query": inner_query,
"filter": {"term": {"has_product": 1}},
"facets": {
"destination": {
"terms": {"field": "hotel.destination_facets.en"},
"facet_filter": {"term": {"has_product": 1}}
},
"hotel_class": {
"terms": {"field": "hotel_class"},
"facet_filter": {"term": {"has_product": 1}}},
"hotel_type": {
"terms": {"field": "hotel.hotel_type_facets.en"},
"facet_filter": {"term": {"has_product": 1}}},
"min_rate": {
"range": {"min_rate": [
{"from": "hotel.min_rate_start",
"to": "hotel.min_rate_end"}]}}}}
Any ideas?
--
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.
For more options, visit https://groups.google.com/groups/opt_out.