You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Sadheera Vithanage <sa...@gmail.com> on 2016/11/08 00:18:43 UTC
Date Comparison in SOLR
Hi Experts,
I am trying to compare dates as below in SOLR and not getting the syntax
right.
If someone could help, It will be so great.
_SolrIntField__i+NOW:{NOW TO *}
Basically what i am trying to do is add an existing int field in solr to
current date and compare it with another date field.
I am getting the below error doing so.
"msg":"undefined field: \"_SolrIntField__i+NOW\"",
Thank you very much.
--
Regards
Sadheera Vithanage
Re: Date Comparison in SOLR
Posted by Sadheera Vithanage <sa...@gmail.com>.
Thanks Erick.
I tried with function queries, but still not getting it right, may be not
using it the correct way.
If someone can let me know how to get the difference of 2 date fields, I
think that might help.
Thank you.
On Tue, Nov 8, 2016 at 11:55 AM, Erick Erickson <er...@gmail.com>
wrote:
> This looks much more like a function query....
>
> Best,
> Erick
>
> On Mon, Nov 7, 2016 at 4:18 PM, Sadheera Vithanage <sa...@gmail.com>
> wrote:
> > Hi Experts,
> >
> > I am trying to compare dates as below in SOLR and not getting the syntax
> > right.
> > If someone could help, It will be so great.
> >
> >
> > _SolrIntField__i+NOW:{NOW TO *}
> >
> > Basically what i am trying to do is add an existing int field in solr to
> > current date and compare it with another date field.
> >
> > I am getting the below error doing so.
> >
> > "msg":"undefined field: \"_SolrIntField__i+NOW\"",
> >
> > Thank you very much.
> >
> >
> >
> > --
> > Regards
> >
> > Sadheera Vithanage
>
--
Regards
Sadheera Vithanage
Re: Date Comparison in SOLR
Posted by Erick Erickson <er...@gmail.com>.
This looks much more like a function query....
Best,
Erick
On Mon, Nov 7, 2016 at 4:18 PM, Sadheera Vithanage <sa...@gmail.com> wrote:
> Hi Experts,
>
> I am trying to compare dates as below in SOLR and not getting the syntax
> right.
> If someone could help, It will be so great.
>
>
> _SolrIntField__i+NOW:{NOW TO *}
>
> Basically what i am trying to do is add an existing int field in solr to
> current date and compare it with another date field.
>
> I am getting the below error doing so.
>
> "msg":"undefined field: \"_SolrIntField__i+NOW\"",
>
> Thank you very much.
>
>
>
> --
> Regards
>
> Sadheera Vithanage