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

Bruno Roustant commented on LUCENE-8921:
----------------------------------------

PR added

> 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: 10m
>  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
(v7.6.14#76016)

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

Reply via email to