Closed mikemccand closed 5 years ago
+1
This is an expert API, so I don't think there would be any worry about changing it in a point release. Do you want to work on a patch/PR?
[Legacy Jira: Alan Woodward (@romseygeek) on Jul 17 2019]
Yes, sure. I could work on a PR for 8.2.
[Legacy Jira: Bruno Roustant (@bruno-roustant) on Jul 17 2019]
Can you open any PRs against master? Then we can backport as needed.
[Legacy Jira: Alan Woodward (@romseygeek) on Jul 17 2019]
+1
[Legacy Jira: Adrien Grand (@jpountz) on Jul 19 2019]
PR added
[Legacy Jira: Bruno Roustant (@bruno-roustant) on Jul 19 2019]
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.
[Legacy Jira: David Smiley (@dsmiley) on Sep 13 2019]
Commit fd0c8b9e810737a119868b8d18d4ed55d5e9c607 in lucene-solr's branch refs/heads/master from Bruno Roustant https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=fd0c8b9
LUCENE-8921: IndexSearcher.termStatistics API change Closes #797
[Legacy Jira: ASF subversion and git services on Sep 17 2019]
Commit a80534a589d20b9aacdcc8677b5b30747f3b893a in lucene-solr's branch refs/heads/branch_8x from Bruno Roustant https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=a80534a
LUCENE-8921: IndexSearcher.termStatistics API change This 8x backport keeps the original method to call the new one. Closes #797
(cherry picked from commit fd0c8b9e810737a119868b8d18d4ed55d5e9c607)
[Legacy Jira: ASF subversion and git services on Sep 17 2019]
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.
Legacy Jira details
LUCENE-8921 by Bruno Roustant (@bruno-roustant) on Jul 17 2019, resolved Sep 17 2019