You could also use FieldCache.getDocsWithField; it returns a bit set
where the bit is set if that document had that field.

Mike McCandless

http://blog.mikemccandless.com

On Mon, Dec 19, 2011 at 7:32 AM, Trejkaz <[email protected]> wrote:
> On Mon, Dec 19, 2011 at 9:05 PM, Paul Taylor <[email protected]> wrote:
>> I was looking for a Query that returns all documents that contain a
>> particular field, it doesnt matter what the value of the field is just that
>> the document contains the field.
>
> If you don't care about performance (or if it runs fast enough
> already), use a PrefixQuery with "" as the prefix.
>
> If you care about performance, add a new field which contains the
> names of each field in the document, and query on that.
>
> TX
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to