Hi,

Use FieldValueFilter for that: 
http://lucene.apache.org/core/4_10_2/core/org/apache/lucene/search/FieldValueFilter.html
If you need a query instead of a Filter, wrap it with ConstantScoreQuery.

This is also much faster than a RangeQuery like suggested by Ahmed.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [email protected]


> -----Original Message-----
> From: Sascha Janz [mailto:[email protected]]
> Sent: Monday, December 01, 2014 8:44 PM
> To: [email protected]
> Subject: lucene query with additional clause field not null
> 
> Hi,
> 
> 
> 
> is there a chance to add a additional clause to a query for a field that 
> should
> not be null ?
> 
> 
> 
> greetings
> 
> sascha
> 
> 
> 
> 



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

Reply via email to