It seems to me like you want to use result grouping by hotel. You'll have to add up the tariffs for each hotel, but that isn't hard.
Upayavira On Wed, Jan 9, 2013, at 06:08 AM, Harshvardhan Ojha wrote: > Hi Alex, > > Thanks for your reply. > I saw "prices based on daterange using multipoints ". But this is not my > problem. Instead the problem statement for me is pretty simple. > > Say I have 100 documents each having tariff as field. > Doc1 > <doc> > <double name="tariff">2400.0</double> > </doc> > > Doc2 > <doc> > <double name="tariff">2500.0</double> > </doc> > > Now a user's search should give me a total tariff. > > Desired result > <doc> > <double name="tariff">4900.0</double> > </doc> > > And this could be any combination for 100 docs it is (100+101)/2. > (N*N+1)/2. > > How can I get these combination of documents already indexed ? > Or is there any way to do calculations at runtime? > > How can I place this constraint that if there is any 1 doc missing in a > range don’t give me any result.(if a user asked for hotel tariff from > 11th to 13th, and I don’t have tariff for 12th, I shouldn't add 11th and > 13th only). > > Hope I made my problem very simple. > > Regards > Harshvardhan Ojha > > -----Original Message----- > From: Alexandre Rafalovitch [mailto:arafa...@gmail.com] > Sent: Tuesday, January 08, 2013 6:12 PM > To: solr-user@lucene.apache.org > Subject: Re: Hotel Searches > > Did you look at a conversation thread from 12 Dec 2012 on this list? Just > go to the archives and search for 'hotel'. Hopefully that will give you > something to work with. > > If you have any questions after that, come back with more specifics. > > Regards, > Alex. > > Personal blog: http://blog.outerthoughts.com/ > LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch > - Time is the quality of nature that keeps events from happening all at > once. Lately, it doesn't seem to be working. (Anonymous - via GTD book) > > > On Tue, Jan 8, 2013 at 7:18 AM, Harshvardhan Ojha < > harshvardhan.o...@makemytrip.com> wrote: > > > Sorry for that, we just spoiled that thread so posted my question in a > > fresh thread. > > > > Problem is indeed very simple. > > I have solr documents, which has all the required fields(from db). > > Say DOC1,DOC2,DOC3.....DOCn. > > > > Every document has 1 night tariff and I have 180 nights tariff. > > So a person can search for any combination in these 180 nights. > > > > Say a request came to me to give total tariff for 10th to 15th of jan 2013. > > Now I need to get a sum of tariff field of 6 docs. > > > > So how can I keep this data indexed, to avoid search time calculation, > > and there are other dimensions of this data also beside tariff. > > Hope this makes sense. > > > > Regards > > Harshvardhan Ojha > > > > -----Original Message----- > > From: Gora Mohanty [mailto:g...@mimirtech.com] > > Sent: Tuesday, January 08, 2013 5:37 PM > > To: solr-user@lucene.apache.org > > Subject: Re: Hotel Searches > > > > On 8 January 2013 17:10, Harshvardhan Ojha < > > harshvardhan.o...@makemytrip.com> wrote: > > > Hi All, > > > > > > Looking into a finding solution for Hotel searches based on the > > > below criteria's > > [...] > > > > Didn't you just post this on a separate thread, complete with some > > nonsensical follow-up from a colleague of yours? Please do not repost > > the same message over and over again. > > > > It is not clear what you are trying to achieve. > > What is the difference between a city and a hotel in your data? How is > > a person represented in your documents? Is it by the ID field? > > > > Are you looking to cache all possible combinations of ID, city, and > > startdate? If so, to what end? This smells like a XY problem: > > http://people.apache.org/~hossman/#xyproblem > > > > Regards, > > Gora > >