[ https://issues.apache.org/jira/browse/LUCENE-10291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454078#comment-17454078 ]
Robert Muir commented on LUCENE-10291: -------------------------------------- There are problems with stored fields/vectors too. Maybe better to give that one a separate issue and temporarily allow stored fields in such a test due to the way they are streamed by indexwriter? Here's are file names and lengths if i add a single empty doc without compound file: {noformat} _0.fdm 157 _0.fdt 78 _0.fdx 64 _0.fnm 61 _0.si 392 segments_1 154 write.lock 0{noformat} > 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 > > 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