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. FWIW Erick On Thu, Dec 3, 2009 at 11:46 AM, Benjamin Heilbrunn <ben...@gmail.com>wrote: > Hi, > > I'm using Lucene 2.9.1 patched with > http://issues.apache.org/jira/browse/LUCENE-1260 > 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: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >