[ https://issues.apache.org/jira/browse/LUCENE-10291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17469390#comment-17469390 ]
ASF subversion and git services commented on LUCENE-10291: ---------------------------------------------------------- Commit 738247e78d1d5ff22f3755d0ceca8ad99d4f69f4 in lucene's branch refs/heads/branch_9x from Yannick Welsch [ https://gitbox.apache.org/repos/asf?p=lucene.git;h=738247e ] LUCENE-10291: Only read/write postings when there is at least one indexed field (#539) > Only read/write postings when there is at least one indexed field > ----------------------------------------------------------------- > > Key: LUCENE-10291 > URL: https://issues.apache.org/jira/browse/LUCENE-10291 > Project: Lucene - Core > Issue Type: Task > Reporter: Adrien Grand > Priority: Minor > Fix For: 9.1 > > Time Spent: 2h 10m > Remaining Estimate: 0h > > Unlike points, norms, term vectors or doc values which only get written to > the directory when at least one of the fields uses the data structure, > postings always get written to the directory. > While this isn't hurting much, it can be surprising at times, e.g. if you > index with SimpleText you will have a file for postings even though none of > the fields indexes postings. This inconsistency is hidden with the default > codec due to the fact that it uses PerFieldPostingsFormat, which only > delegates to any of the per-field codecs if any of the fields is actually > indexed, so you don't actually get a file if none of the fields is indexed. > We noticed this behavior by creating a codec that throws > UnsupportedOperationException for postings since it's not expected to have > postings, and it always fails writing or reading data. While it's easy to > work around this issue on top of Lucene by using a dummy postings format, it > would be better to fix Lucene to handle postings consistently with other data > structures? -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org