lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <ser...@gmail.com>
Subject Re: In-Order score and Out-of-order score
Date Thu, 16 Dec 2010 09:54:20 GMT
Hi

These questions are often better sent to the user list.

Depending on the context, this has a slightly different explanation. In
general though, Lucene matches documents relevant to a certain query.
Usually, in most cases, the documents are matched in increasing document id
order (hence, in-order) and the Collector receives the docs in increasing
order (1, 5, 7, 192 etc.).

There are some cases where Lucene can work much faster if out of order
scoring is allowed (e.g., 1, 7, 192, 5), in which case the Collector will
receive the documents out of order.

Collectors can tell Lucene whether they support out-of-order scoring. For
example, the TotalHitsCountCollector which counts the number of documents
the query matched does not care about the order the documents are handed to
it, as it totally ignores them. TopScoreDocCollector has two impls, one
supports out-of-order and one doesn't. So if you implement a Collector,
think if the order of the doc IDs passed to collect() can affect you and
return true/false accordingly. If possible, out of order Collectors are
preferable because they allow Lucene to use faster Query implementations.

Weight can be instructed to return a Scorer which scores in-order or not,
depending on the Collector passed in to IndexSearcher.search(). If the
Collector does not support out-of-order scoring, then the Scorer returned by
Weight *must* score the documents in-order.

These two API try to match the best Collector and Scorer implementation
Lucene can offer.

Hope this helps,

Shai

On Thu, Dec 16, 2010 at 11:38 AM, Romi <romijain3186@gmail.com> wrote:

>
> I am working with Lucene3.0.2. Can any buddy tell me what is In-order
> scoring
> and Out-Of-order scoring. please reply.
>
>
> -----
> Romi
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/In-Order-score-and-Out-of-order-score-tp2097385p2097385.html
> Sent from the Lucene - General mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message