lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Indika Tantrigoda <indik...@gmail.com>
Subject Re: Stored values and date math query
Date Fri, 01 Mar 2013 16:51:41 GMT
Hi Erick,

Thanks for the response. The the terms are indexed. I will need to dig
deeper and see there the issue is, it might be a correct syntax but I may
be using it incorrectly. In the meantime I have added a new column that
is end_time - order_prep_time and validate if a session is available
against that. Basically move the order_prep_time to the other side of the
equation.

Thanks,
Indika

On 28 February 2013 18:45, Erick Erickson <erickerickson@gmail.com> wrote:

> Just to check, your order_prep_time is _indexed_ too, right? It's
> a bit confusing but anything you use in your function queries will
> be from indexed terms, not stored ones
>
> Best
> Erick
>
>
> On Tue, Feb 26, 2013 at 4:05 PM, Indika Tantrigoda <indika85@gmail.com
> >wrote:
>
> > Hi All,
> >
> > I am trying to use a stored value in the index and add it to a date
> > component as follows
> >
> > sessionAvailableNowQuery = {!edismax}(start_time:[* TO
> > 1970-01-01T12:37:030Z] AND end_time:[1970-01-01T12:37:030Z +
> > (_val_:order_prep_time)MINUTES TO *] AND consumers:[1 TO *] AND
> > session_time_range_available:true)
> >
> > (order_prep_time is the stored value)
> >
> > However, when doing so causes the query to return incorrect results. The
> > query is part of a if/else query present in the fields (fl) list
> >
> > _session_available_now_:if(exists(query($sessionAvailableNowQuery)), 100,
> > 0)
> >
> > Is it possible to retrive an integer value from the index and pass it on
> it
> > a date math query ? Is there anything else that needs to be in the query
> ?
> >
> > Thanks in advance.
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message