lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Commented: (LUCENE-1656) When sorting by field, IndexSearcher should not compute scores by default
Date Wed, 27 May 2009 15:38:46 GMT


Michael McCandless commented on LUCENE-1656:

bq. Maybe state in CHANGES that IndexSearcher.setDefaultFieldSortScoring is deprecated and
it is just an intermediary solution?

Good, I'll do that.

bq. Also, the tests call this method and set it to true. Since this new method is deprecated,
we'll need to change those tests again in 3.0. Can they create TFC instead and call the appropriate
search method?

Unfortunately, there were two problems with this (I had started with

  * You can't pass Collector through RemoteSearchable, which some
    tests were using.  We are planning to deprecate & remove
    RMI/RemoteSearchable from Lucene's core in for 3.0, so we'll fix
    such tests for 3.0.

  * You can't pass SortField.AUTO directly to TFDC.

So, since TFDC wasn't a direct drop-in, I decided to add the
deprecated method.

I'm actually wondering if we should deprecate SortField.AUTO...?  It's
a little too magical, can easily guess wrong, unexpectedly binds
SortField to a needing an IndexReader to resolve the AUTO, has caused
us problems in the past, etc.  I prefer that the API be explicit and
require you to specify what type Lucene should cast the field to.

> When sorting by field, IndexSearcher should not compute scores by default
> -------------------------------------------------------------------------
>                 Key: LUCENE-1656
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>         Attachments: LUCENE-1656.patch
> In 2.9 we've added the ability to turn off scoring (maxScore &
> trackScores, separately) when sorting by field.
> I expect most apps don't use the scores when sorting by field, and
> there's a sizable performance gain when scoring is off, so I think for
> 2.9 we should not score by default, and add show in CHANGES how to
> enable scoring if you rely on it.
> If there are no objections, I'll commit that change in a day or two
> (it's trivial).

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