Unsupported operation in TermDocs.next() when migrating from 2.4 to 2.9

That is spooky. It certainly sounds like a regression.

It’s odd that your MultiTermEnum is pulling an AllTermDocs under the hood — this should only happen if you did a .seek(null) on it, but your code seems to first check that term != null, so it should never pass a null term.

Can you add a temporary assert to DirectoryReader.java, in 29x, around line 1191. It should be this method:

protected TermDocs termDocs(IndexReader reader) throws IOException { return term==null ? reader.termDocs(null) : reader.termDocs(); }

Add an assert term != null, and run you code w/ assertions on, and see if it trips (the assert is not safe, in general, but should not trip in how I think you are using it). If it does trip… try to track down how a null term got in there?

Mike

On Tue, Jun 29, 2010 at 5:24 AM, Jerven Bolleman wrote:

Leave a comment

0 Comments.

Leave a Reply