lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: [jira] [Commented] (LUCENE-6272) Scorer should not extend PostingsEnum
Date Fri, 20 Feb 2015 22:13:46 GMT
In IntelliJ when you reformat, there's a choice of "only VCS changed
text" or something like that that pretty much avoids things like
reordering imports, although you may have to uncheck "rearrange


On Fri, Feb 20, 2015 at 2:10 PM, Shawn Heisey (JIRA) <> wrote:
>     [
> Shawn Heisey commented on LUCENE-6272:
> --------------------------------------
> I use eclipse.  Hopefully one day I can switch, but haven't had enough time to learn
IntelliJ yet.
> I haven't looked at everything that gets set by the idea/eclipse targets, but I would
have hoped that those targets would force all formatting templates at the project level. 
I know that for eclipse, the general formatting (indentation, etc) *is* set by the eclipse
>> Scorer should not extend PostingsEnum
>> -------------------------------------
>>                 Key: LUCENE-6272
>>                 URL:
>>             Project: Lucene - Core
>>          Issue Type: Improvement
>>            Reporter: Alan Woodward
>>            Priority: Minor
>>         Attachments: LUCENE-6272.patch, LUCENE-6272.patch
>> Scorer currently has to implement a whole bunch of methods that are never called.
 The only method that Scorer uses in addition to the methods on DocIdSetIterator is freq(),
and as currently implemented this means different things on different Scorers:
>> * TermScorer returns its underlying termfreq
>> * MinShouldMatchScorer returns how many of its subscorers are matching
>> * {Exact|Sloppy}PhraseScorer returns how many phrases it has found on a document
>> In addition, freq() is never actually called on TermScorer, and it's only used in
explain() on the phrase scorers.
>> We should make Scorer extend DocIdSetIterator instead.  In place of freq(), Scorer
would have a coord() method that by default returns 1, and for boolean scorers returns how
many subscorers are matching.
> --
> This message was sent by Atlassian JIRA
> (v6.3.4#6332)
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message