-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate Search : Lucene Range Query
PostPosted: Wed Feb 17, 2010 5:32 am 
Newbie

Joined: Wed Dec 16, 2009 1:54 am
Posts: 7
Hi,
How to search for null values?
Like get me all salaries <5000 now i need results with salary not set i.e null
Setting null term in RangeQuery/ConstantScoreRangeQuery is not working as that is being replaced bu [* TO 5000] or [ TO 5000] both not giving results
what i tried is
Code:
new ConstantScoreRangeQuery("field", null,value,
               false, true);


Regards
sur04sep


Top
 Profile  
 
 Post subject: Re: Hibernate Search : Lucene Range Query
PostPosted: Wed Feb 17, 2010 8:16 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Null values are actually not indexed in Hibernate Search or Lucene as a matter of fact. You could use a custom FieldBridge together with a null token of your choice to solve your problem. This is related to HSEARCH-115.

--Hardy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.