You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Bruno Roustant (JIRA)" <ji...@apache.org> on 2019/07/17 08:04:00 UTC
[jira] [Created] (LUCENE-8921) IndexSearcher.termStatistics should
not require TermStates but docFreq and totalTermFreq
Bruno Roustant created LUCENE-8921:
--------------------------------------
Summary: 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
Fix For: master (9.0)
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org