lucene query "not null" in Studio

3,132 views
Skip to first unread message

Nick

unread,
May 23, 2013, 1:56:39 PM5/23/13
to rav...@googlegroups.com
I created a test index where I index only one field, called Loc. It is a structure with several other fields.
I would like to get the objects that have this field NOT NULL, so I'm writing:

-Loc:[[NULL_VALUE]]

But I get no results. I know that some objects have this field set to null and some others don't. I can see NULL_VALUE in the terms.

Thanks

Oren Eini (Ayende Rahien)

unread,
May 24, 2013, 1:45:15 AM5/24/13
to ravendb
You need to have at least one positive match

*:* AND -Loc:[[NULL_VALUE]]



--
You received this message because you are subscribed to the Google Groups "ravendb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Nick

unread,
May 24, 2013, 11:09:52 AM5/24/13
to rav...@googlegroups.com
Thank you Oren.

Nick

unread,
May 24, 2013, 11:30:30 AM5/24/13
to rav...@googlegroups.com
How could I also ensure in the same query that the underlying field exists?
I ask because your query also gives me all objects that don't have the Location field set.

Oren Eini (Ayende Rahien)

unread,
May 24, 2013, 11:41:28 AM5/24/13
to ravendb
Location:*

Wallace Turner

unread,
Jun 15, 2014, 8:48:19 PM6/15/14
to rav...@googlegroups.com
it should be noted that its *:* - not *.*  

ie use a colon : instead of a dot
Reply all
Reply to author
Forward
0 new messages