lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Is it possible to search for the empty string?
Date Tue, 19 May 2015 01:21:34 GMT
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 <> 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.


View raw message