lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: how to match Documents from Hits with Documents from Query Spans?
Date Tue, 18 Apr 2006 17:29:30 GMT

: For some reason, there is a disagreement between the order the
: Documents are returned in hits, and the Documents are referenced (via
: order number, starting from 0) in the Spans?

When dealing with a Hits instance, documents are iterated over in "results
order" -- which may be by score, or may be by some other sort you've

When dealing with a Spans instance, i believe the matches are iterated
over in index order.  Besides the perofrmance reasosn why this may
be true, you also have to keep in mind that the Spans instance has no
idea what ordering you may have used when you executed your search -- even
if it assumed you sorted by score, the SpanQuery may have been a part of a
much larger more complicated query in which the final scores were vastly

If i've missunderstood your problem, could you plee post a JUnit test case
that builds a small index in a RAMDIrectory, with some code that
demonstrates what you expect to happen, and how it fails?


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

View raw message