On 5/18/2015 7:16 PM, Lianyi Han wrote: > Would field:"" works in your case? > > Best, > On Mon, May 18, 2015 at 8:56 PM Shawn Heisey <[email protected]> wrote: > >> Can I search for the empty string? This is distinct from searching for >> documents that don't have a certain fieldat all, which I can already do >> with a clause of "*:* -field:[*TO *]"in my query. >> >> Thanks, >> Shawn
I haven't tried it, because right now my indexing code barfs on an empty string, so there are no empty strings in the index. I'll need to manually put a document in the index and try that. A possible further complication: The field is whitespace tokenized and multivalued, where one value may be the empty string but other values could be non-empty strings. Thanks, Shawn
