[
https://issues.apache.org/jira/browse/LUCENE-8921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16929311#comment-16929311
]
David Smiley commented on LUCENE-8921:
--------------------------------------
Barring further feedback, I'll commit what Bruno has Tuesday next week. As
discussed in GitHub, the 8x backport will retain the current method, made
final, made deprecated , and will call the new method to do the work.
> 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: 2h 50m
> 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: [email protected]
For additional commands, e-mail: [email protected]