[ 
https://issues.apache.org/jira/browse/LUCENE-8921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16931809#comment-16931809
 ] 

ASF subversion and git services commented on LUCENE-8921:
---------------------------------------------------------

Commit a80534a589d20b9aacdcc8677b5b30747f3b893a in lucene-solr's branch 
refs/heads/branch_8x from Bruno Roustant
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=a80534a ]

LUCENE-8921: IndexSearcher.termStatistics API change
This 8x backport keeps the original method to call the new one.
Closes #797

(cherry picked from commit fd0c8b9e810737a119868b8d18d4ed55d5e9c607)


> IndexSearcher.termStatistics should not require TermStates but docFreq and 
> totalTermFreq
> ----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-8921
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8921
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>    Affects Versions: 8.1
>            Reporter: Bruno Roustant
>            Priority: Major
>             Fix For: master (9.0)
>
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> IndexSearcher.termStatistics(Term term, TermStates context) is the way to 
> create a TermStatistics. It requires a TermStates param although it only 
> cares about the docFreq and totalTermFreq.
>  
> For customizations that what to create TermStatistics based on docFreq and 
> totalTermFreq, but that do not have available TermStates, this method forces 
> to create a TermStates instance (which is not very lightweight) only to pass 
> two ints.
> termStatistics could be modified to the following signature:
> termStatistics(Term term, int docFreq, int totalTermFreq)
> Since it would change the API, it could be done in master for next major 
> release.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to