dungba88 commented on code in PR #12624:
URL: https://github.com/apache/lucene/pull/12624#discussion_r1391172089


##########
lucene/core/src/java/org/apache/lucene/util/fst/FSTCompiler.java:
##########
@@ -120,31 +122,54 @@ public class FSTCompiler<T> {
   final float directAddressingMaxOversizingFactor;
   long directAddressingExpansionCredit;
 
-  final BytesStore bytes;
+  // writer for frozen nodes
+  final FSTDataOutputWriter fstWriter;
+  // reader for the frozen nodes
+  final FSTReader fstReader;

Review Comment:
   ~~That's true, I'll remove it.~~
   
   Actually, the FSTReader was needed to create the FST itself. This reader was 
mainly used for:
   - Read from the FST with `getBytesReader()`
   - Save the FST with `save()`
   
   So even if we track the size ourselves, we still need to have the FSTReader 
when creating the FST object. But I have removed it from the class attributes.



-- 
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