Elastichsearch Price Aggregations on multi Nested Objects


(Anushank Lal) #1

We have multiple hotels and each hotel has diffirent price for different date which is also device specific. Now, if user search for a date range(11-04-2016 to 13-04-2016) then we need to get:

Hotel sorted against thier aggregate prices for the given dates for each device type.

I had kept prices, availability & dates within nested objects. Here are the gists for my current mappings, input data output & search query:

Aggregation Query & output:

Please help me to use aggregation to solve this problem or suggest any other solution for this.

Thanks,
Anushank


Elastichsearch Aggregations
(Chirag) #2

The problem statement is not clear. kindly rephrase with clarity and add sample input data and expected output format.


(Anushank Lal) #3

Hi, I had rephased the problem & also added sample input & output in gist.


(system) #4