Jackie-Jiang commented on code in PR #11857:
URL: https://github.com/apache/pinot/pull/11857#discussion_r1380779504


##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/V1Constants.java:
##########
@@ -44,14 +44,17 @@ public static class Indexes {
     public static final String UNSORTED_MV_FORWARD_INDEX_FILE_EXTENSION = 
".mv.fwd";
     public static final String BITMAP_INVERTED_INDEX_FILE_EXTENSION = 
".bitmap.inv";
     public static final String BITMAP_RANGE_INDEX_FILE_EXTENSION = 
".bitmap.range";
-    public static final String FST_INDEX_FILE_EXTENSION = ".lucene.fst";
     public static final String JSON_INDEX_FILE_EXTENSION = ".json.idx";
     public static final String NATIVE_TEXT_INDEX_FILE_EXTENSION = 
".nativetext.idx";
     public static final String H3_INDEX_FILE_EXTENSION = ".h3.idx";
     public static final String BLOOM_FILTER_FILE_EXTENSION = ".bloom";
     public static final String NULLVALUE_VECTOR_FILE_EXTENSION = 
".bitmap.nullvalue";
+    public static final String FST_INDEX_FILE_EXTENSION = ".lucene.fst";

Review Comment:
   Rename it to `LUCENE_FST_INDEX_FILE_EXTENSION`. Also seems it is mistakenly 
used as native FST extension as well, so you might need to take a look if that 
needs to be fixed



##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/store/SegmentDirectoryPaths.java:
##########
@@ -80,7 +80,12 @@ public static File findCreationMetaFile(File indexDir) {
   @Nullable
   public static File findTextIndexIndexFile(File indexDir, String column) {
     String luceneIndexDirectory = column + 
V1Constants.Indexes.LUCENE_TEXT_INDEX_FILE_EXTENSION;
-    return findFormatFile(indexDir, luceneIndexDirectory);
+    File indexFormatFile = findFormatFile(indexDir, luceneIndexDirectory);

Review Comment:
   We should prioritize v9 over v8. Same for other places



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/TextIndexUtils.java:
##########
@@ -43,9 +43,9 @@ private TextIndexUtils() {
 
   static void cleanupTextIndex(File segDir, String column) {
     // Remove the lucene index file and potentially the docId mapping file.
-    File luceneIndexFile = new File(segDir, column + 
Indexes.LUCENE_TEXT_INDEX_FILE_EXTENSION);
+    File luceneIndexFile = new File(segDir, column + 
Indexes.LUCENE_V9_TEXT_INDEX_FILE_EXTENSION);

Review Comment:
   Should we also delete v8 indices?



-- 
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: commits-unsubscr...@pinot.apache.org

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


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

Reply via email to