lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Updated: (LUCENE-2190) CustomScoreQuery (function query) is broken (due to per-segment searching)
Date Sat, 20 Feb 2010 13:25:27 GMT


Uwe Schindler updated LUCENE-2190:

    Attachment: LUCENE-2190-2.patch

Here a better solution. It now works like Filter's getDocIdSet: For customizing scores, you
have to override the similar protected method getCustomScoreProvider(IndexReader) and return
a subclass of CustomScoreProvider. The default delegates to the backwards layer.

The semantics is now identical to filters: Each IndexReader of a segment gets its own calculator
like its own DocIdSet in filters.

Also fixes the following problems:
- rewrite() was incorrectly implemented (now works like BooleanQuery.rewrite())
- equals/hashCode ignored strict

> CustomScoreQuery (function query) is broken (due to per-segment searching)
> --------------------------------------------------------------------------
>                 Key: LUCENE-2190
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 2.9, 2.9.1, 3.0, 3.0.1, 3.1
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 2.9.2, 3.0.1, 3.1
>         Attachments: LUCENE-2190-2.patch, LUCENE-2190.patch
> Spinoff from here:
> With the cutover to per-segment searching, CustomScoreQuery is not really usable anymore,
because the per-doc custom scoring method (customScore) receives a per-segment docID, yet
there is no way to figure out which segment you are currently searching.
> I think to fix this we must also notify the subclass whenever a new segment is switched
to.  I think if we copy Collector.setNextReader, that would be sufficient.  It would by default
do nothing in CustomScoreQuery, but a subclass could override.

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