You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Drew Foulks (Jira)" <ji...@apache.org> on 2022/09/22 17:42:00 UTC
[jira] [Updated] (LUCENE-8921) IndexSearcher.termStatistics should not require TermStates but docFreq and totalTermFreq
[ https://issues.apache.org/jira/browse/LUCENE-8921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Drew Foulks updated LUCENE-8921:
--------------------------------
Reporter: Bruno Roustant (was: Bruno Roustant)
> 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
> Assignee: David Smiley
> Priority: Major
> Fix For: 8.3
>
> 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.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org