1

This ought to be simple enough, but I can't get a select statement going in RavenDB Studio where I say "give me all documents where field NAME_x is empty". The usual suspects don't yield anything:

NAME_5:[[EMPTY_STRING]]

NOT NAME_5:[[EMPTY_STRING]] (just to see if the logic was backwards somehow)

NAME_5: [[NULL_VALUE]]

The index DOES include all fields (NAME_0 through NAME_5) and there ARE plenty of records that have this

(...)
"NAME_5": "",
(...)

so my quesion is - why don't they show up ? I guess the query's syntax is wrong, but I don't know where/how. Thanks for a hint !

Hiro Protagonist
  • 474
  • 3
  • 15
  • 1
    RavenDb is built on top of *Lucine*. Try https://stackoverflow.com/a/11890368/5737562 – Danielle Jun 08 '17 at 15:52
  • 1
    Thanks - that pointed me in the right direction. So it _seems_ that "give me all docs where name_4 has something and name_5 has nothing" should be `*:* -NAME_4:[[EMPTY_STRING]] +NAME_5:[[EMPTY_STRING]]` – Hiro Protagonist Jun 08 '17 at 16:28

1 Answers1

2

This should just work. See: http://live-test.ravendb.net/studio/index.html#databases/query/index/recentquery--187795092?&database=44438301 enter image description here

Here is what I get when I try.

Ayende Rahien
  • 22,925
  • 1
  • 36
  • 41
  • Ayende - thank you for your answer. This is really strange - I *swear* I didn't get that result - but hey . It works :-) Retrospectively, I think it might have been a combination of emptys and not emptys - my Luecene syntax skills are nearly nonexistant... – Hiro Protagonist Jun 11 '17 at 14:32