Sorry that I couldn't explain properly. Let me try again.

So, when I search with the term "Radisson" and a date range. I want to 
filter the name with that term and then filter the rates with the date 
range. After that do some calculation with those filtered rates. Which will 
produce something like the following.

[
  {
    "name": "Hotel Radisson"
    "rate": 80
  }
]




On Wednesday, September 24, 2014 1:31:37 PM UTC+6, David Pilato wrote:
>
> I did not understand what you are trying to produce.
>
> May be you could paste here what kind of output you are expecting?
>
>
> -- 
> *David Pilato* | Technical Advocate | *elasticsearch.com 
> <http://elasticsearch.com>*
> [email protected] <javascript:>
> @dadoonet <https://twitter.com/dadoonet> | @elasticsearchfr 
> <https://twitter.com/elasticsearchfr> | @scrutmydocs 
> <http://twitter.com/scrutmydocs>
> <https://twitter.com/scrutmydocs>
>
>
>
> Le 24 septembre 2014 à 09:19:26, Rifat Nabi ([email protected] 
> <javascript:>) a écrit:
>
> Anyone? :(
>
> On Sunday, September 21, 2014 9:17:26 PM UTC+6, Rifat Nabi wrote: 
>>
>> Hi 
>>
>> I'm very new to elasticsearch and was trying to find an efficient way to 
>> solve the following problem.
>>
>> Lets say I have the following data structure-
>>
>>  {
>>   "name": "Hotel Radisson",
>>   "rates": [
>>     {
>>       "from": "2014-01-01",
>>       "to": "2014-02-02",
>>       "price": 100
>>     },
>>     {
>>       "from": "2014-01-01",
>>       "to": "2014-02-02",
>>       "price": 150
>>     },
>>     ...
>>   ]
>> }
>>  
>> Now, I want to do a range query on the rates and calculate a rate using 
>> the resulted data from the result. And, use that rate as facet.
>>
>> I was thinking of trying with aggregation. But, is it the correct way to 
>> do it? will it be efficient? Or there's a better way to do it.
>>
>> Thanks in advance.
>>  
>  --
> 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] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/3b6452c6-724c-4612-b6d0-a5f607274dac%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/elasticsearch/3b6452c6-724c-4612-b6d0-a5f607274dac%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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/62d14c1a-c0db-404c-85a3-d9794e028b9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to