Closed mikemccand closed 5 years ago
This issue has been encountered in LUCENE-8753 (Uniform Split posting format).
[Legacy Jira: Bruno Roustant (@bruno-roustant) on Jul 09 2019]
+1 to simply make IntBlockTermState
public.
[Legacy Jira: Michael McCandless (@mikemccand) on Jul 09 2019]
PR added
[Legacy Jira: Bruno Roustant (@bruno-roustant) on Jul 19 2019]
Commit 52b5ec8068861d3724c83f63142105b7294cceef in lucene-solr's branch refs/heads/master from Bruno Roustant https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=52b5ec8
LUCENE-8906: Lucene50PostingsFormat.IntBlockTermState becomes public
[Legacy Jira: ASF subversion and git services on Aug 01 2019]
Commit 0bebca85577a697d55b7bea79ef933824cae1597 in lucene-solr's branch refs/heads/branch_8x from Bruno Roustant https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=0bebca8
LUCENE-8906: Lucene50PostingsFormat.IntBlockTermState becomes public
(cherry picked from commit 52b5ec8068861d3724c83f63142105b7294cceef)
[Legacy Jira: ASF subversion and git services on Aug 01 2019]
Merged PR. Thanks Bruno!
[Legacy Jira: David Smiley (@dsmiley) on Aug 01 2019]
Commit 52b5ec8068861d3724c83f63142105b7294cceef in lucene-solr's branch refs/heads/SOLR-13105-visual from Bruno Roustant https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=52b5ec8
LUCENE-8906: Lucene50PostingsFormat.IntBlockTermState becomes public
[Legacy Jira: ASF subversion and git services on Aug 04 2019]
Lucene50PostingsReader is the public API that offers the postings() method to read the postings. Any PostingFormat can use it (as well as Lucene50PostingsWriter) to read/write postings.
But the postings() method asks for a (public) BlockTermState param which is internally cast to the private IntBlockTermState. This BlockTermState is provided by Lucene50PostingsReader.newTermState().
public PostingsEnum postings(FieldInfo fieldInfo, BlockTermState termState, PostingsEnum reuse, int flags)
This actually makes impossible to a custom PostingFormat customizing the Block file structure to use this postings() method by providing their (Int)BlockTermState, because they cannot access the FP fields of the IntBlockTermState returned by PostingsReaderBase.newTermState().
Proposed change:
Legacy Jira details
LUCENE-8906 by Bruno Roustant (@bruno-roustant) on Jul 09 2019, resolved Aug 01 2019