atris commented on code in PR #8384: URL: https://github.com/apache/pinot/pull/8384#discussion_r863163455
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/TextIndexUtils.java: ########## @@ -36,6 +40,45 @@ static void cleanupTextIndex(File segDir, String column) { } static boolean hasTextIndex(File segDir, String column) { - return new File(segDir, column + V1Constants.Indexes.LUCENE_TEXT_INDEX_FILE_EXTENSION).exists(); + return new File(segDir, column + V1Constants.Indexes.LUCENE_TEXT_INDEX_FILE_EXTENSION).exists() || new File(segDir, + column + V1Constants.Indexes.NATIVE_TEXT_INDEX_FILE_EXTENSION).exists(); + } + + public static boolean isFstTypeNative(@Nullable Map<String, String> textIndexProperties) { + if (textIndexProperties == null) { + return false; + } + + for (Map.Entry<String, String> entry : textIndexProperties.entrySet()) { + if (entry.getKey().equalsIgnoreCase(FieldConfig.TEXT_FST_TYPE)) { + return entry.getValue().equalsIgnoreCase(FieldConfig.TEXT_NATIVE_FST_LITERAL); + } + } + + return false; + } + + public static FSTType getFSTTypeOfIndex(File segmentIndexDir, String columnName) { + boolean foundNativeTextIndex = false; Review Comment: How would the Lucene text index work then, given that it depends on finding the Lucene segment file? -- 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