-->
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 3.4 : How to filter by null value fields
PostPosted: Thu Jul 28, 2011 9:14 pm 
Regular
Regular

Joined: Tue May 17, 2011 1:45 am
Posts: 52
Hi,

When I index a table from my database there is a field status_code which can have null values, the index does not store that field for records which has its value as NULL. In my search query I need to search/filter on the field status_code where status_code=NULL.

However since this field is not getting stored for NULL values my query is failing. How do I over come this?


Thanks,
David


Top
 Profile  
 
 Post subject: Re: Hibernate Search 3.4 : How to filter by null value fields
PostPosted: Fri Jul 29, 2011 4:55 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
look into the reference documentation for "indexNullAs", and set the default null token to something which doesn't cause ambiguity (maybe the literal "NULL" ?), then you can search for your custom token.

_________________
Sanne
http://in.relation.to/


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.