Sorry, but the Lucene and Solr query parsers do not have support for the relational operators (although the LucidWorks Search query parser does, but that's for Solr). You simply need to use range queries:

x < v   -> x:[* TO v}
x <= v   -> x:[* TO v]
x > v -> x:{v TO *]
x >= v -> x:[v TO *]

Note the use of curly braces for exclusive end points.

-- Jack Krupansky

-----Original Message----- From: Umashanker, Srividhya
Sent: Tuesday, October 29, 2013 3:57 AM
To: [email protected]
Subject: DateQuery with comparison operators

HI -

I are using Lucene 4.5 and want to support date comparisons with < > <= >= !=. Right now, we parse the string and create RangeQuery. Is there an inbuilt way to do date based comparisons ie., "dob <= 2013-10-23T14:47:54.776Z"

-Vidhya

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to