dungba88 commented on PR #12980:
URL: https://github.com/apache/lucene/pull/12980#issuecomment-1869385378

   I found another quite tricky issue:
   
   If we write the FST directly to the IndexOutput, there might be a chance 
that there's no term accepted by the FST, in that case we still write the 
padding 0 byte. This padding byte is to ensure no node having the 0 address: 
https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/util/fst/FSTCompiler.java#L172-L174
   
   However, since we are writing the FST consecutively for each field, 
appending to the same file, that means there could be a case we still write 
that additional padding byte, which is mapped to no field:
   [ FST_Field_1 ] [ 0 ] [ FST_Field_2 ]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to