lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <yo...@lucidimagination.com>
Subject Re: BitSet Filter ArrayIndexOutOfBoundsException?
Date Thu, 16 Apr 2009 01:06:22 GMT
On Wed, Apr 15, 2009 at 8:35 PM, Ryan McKinley <ryantxu@gmail.com> wrote:
> uggg.  So there is no longer a consistent docId I can use in a filter?

There are ways around this... I had to do something for Solr's
external file field to get it to work because of these changes.  We
can continue this part of the discussion in solr-land, but you could
either
- pop back to the top level from the sub-reader, if you really need a single set
- if a set-per-reader will work, then cache per segment (better for
incremental updates anyway)

> How would I get all the doc ids with a given (stored) field from a Reader?
>  I am trying:
>
>  TermDocs td = reader.termDocs();

Relatively new in 2.9, you can pass null to enumerate over all non-deleted docs:
TermDocs td = reader.termDocs(null);

It would probably be a lot faster to iterate over indexed values though.

-Yonik

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message