Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
8.1
-
None
-
New
Description
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.
Attachments
Issue Links
- links to