On Thu, Jul 16, 2009 at 6:38 AM, eks dev<eks...@yahoo.co.uk> wrote:

> and this String has exactly that form
> (x OR y OR z) OR (a OR b OR c),
> That is exactly how I construct the Query, have a look at brackets on this 
> toString result .

Duh!  OK, I had missed that your large query actually had 2 clauses at
the top!  Sigh.

OK, that part of the puzzle now at least makes sense.  The rewrite()
of your query will not reduce to a single OR query (as I previously
thought).

So in fact you have a BS at the top (because you called
setAllowDocsOutOfOrder(true)), with 2 clauses, and each of those
clauses uses BS2 to score.

I think advance() is not involved, but LUCENE-1744 could very well
have fixed this, because BS calls sub.scorer.docID() when interacting
with its sub-scorers, and due to LUCENE-1744, that would always return
-1 from a BS2, so BS could enter an infinite loop.

If you run w/o the fix for LUCENE-1744, with my instrumentation, I can
confirm this.  But I think likely this is it.

Also: you started this thread by saying "some queries are 4X slower
than before".  Was that a different issue?  (Because this issue is
"the query runs forever").

Mike

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

Reply via email to