lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Commented: (LUCENE-2578) cutover FunctionQuery tests to use RandomIndexWriter, for better testing
Date Wed, 04 Aug 2010 10:38:15 GMT


Michael McCandless commented on LUCENE-2578:

bq.The only bizzare thing is... somehow, the changeup in the index causes the scores to be
off by a bit (eg 1199.8008 vs 1199.8007),

OK I tracked this down: it's due to the ScorerDocQueue inside DisjunctionSumScorer.  The test
that was failing was a BQ with 3 SHOULD clauses.  The ScorerDocQueue, which holds the current
sub-scorers "ordered" by their docIDs, does not break ties (it has no real reason to).  When
you simply .nextDoc().score() the matching docs, these three subs' scores were summed in one
order.  But then QueryUtil does a scorer.advance() to each doc, and that .advance() was then
pulling the matching docs in a different order from the queue.  Summing the same 3 floats
in different orders can easily result in a slightly different float due to different truncation.

I'll commit shortly w/ the threshold increased from 1e-5 to 1e-3.

> cutover FunctionQuery tests to use RandomIndexWriter, for better testing
> ------------------------------------------------------------------------
>                 Key: LUCENE-2578
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>         Attachments: LUCENE-2578.patch

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message