lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Norm Value of not existing Field
Date Thu, 03 Dec 2009 18:32:52 GMT
It would be clumsier, but you could create a Filter by spinning
through all the terms on a field and setting the appropriate bit.

You could even do this at startup and store the filters around for
all the fields you care about, or cache them when first used.

The advantage I see here is that it wouldn't depend upon
what looks like a peculiarity in field norms.

The disadvantage is that I bet it's slower.


On Thu, Dec 3, 2009 at 11:46 AM, Benjamin Heilbrunn <>wrote:

> Hi,
> I'm using Lucene 2.9.1 patched with
> For some special reason I need to find all documents which contain at
> least 1 term in a certain field.
> This works by iterating the norms array only as long as the field
> exists on every document.
> For documents without the field the norms array holds the byte-value 124.
> Where does 124 come from - and is there a way to change it to an other
> value like -128 (0xFF) for not existing fields?
> Benjamin
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message