On 11/5/07, Mike Streeton <[EMAIL PROTECTED]> wrote: > Can TermDocs be reused i.e. can you do. > > TermDocs docs = reader.termDocs(); > docs.seek(term1); > int i = 0; > while (docs.next()) { > i++; > } > docs.seek(term2); > int j = 0; > while (docs.next()) { > j++; > } > > Reuse does seem to work but I get ArrayIndexOutOfBoundsExceptions from > BitVector it I reuse the same one over a period of time.
That shouldn't happen... your reuse looks fine. TermDocs instances are not thread safe - I assume you are only reusing it from a single thread? Is it possible for you to create a test case that reproduces this? -Yonik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]