lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
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
To: java-user@lucene.apache.org
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message