lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: DateQuery with comparison operators
Date Tue, 29 Oct 2013 15:27:15 GMT
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
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"


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message