java-user@lucene.apache.org
[Top] [All Lists]

Creating a Query that matches Documents without a specific Field set?

Subject: Creating a Query that matches Documents without a specific Field set?
From: Benjamin Pasero
Date: Tue, 9 Feb 2010 18:04:35 +0100
Hi,

is there any way I can search for Documents that have a specific Field not set?

The use case is obvious: Consider you introduce a new field to your
documents but dont want to migrate all other documents,
how would you be able to write a Query that covers both old and new documents?

I was hoping that a simple TermQuery where the term value was set to
be an empty String would help me out but I was prooven
wrong.

Thanks for helping,
Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>