siddharthteotia commented on code in PR #9708:
URL: https://github.com/apache/pinot/pull/9708#discussion_r1011238308
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/TextIndexUtils.java:
##########
@@ -64,4 +71,50 @@ public static boolean isFstTypeNative(@Nullable Map<String,
String> textIndexPro
public static FSTType getFSTTypeOfIndex(File indexDir, String column) {
return SegmentDirectoryPaths.findTextIndexIndexFile(indexDir, column) !=
null ? FSTType.LUCENE : FSTType.NATIVE;
}
+
+ @Nullable
+ public static List<String> extractStopWordsInclude(String colName,
+ Map<String, Map<String, String>> columnProperties) {
+ return extractStopWordsInclude(columnProperties.getOrDefault(colName,
null));
+ }
+
+ @Nullable
+ public static List<String> extractStopWordsExclude(String colName,
+ Map<String, Map<String, String>> columnProperties) {
+ return extractStopWordsExclude(columnProperties.getOrDefault(colName,
null));
+ }
+
+ @Nullable
+ public static List<String> extractStopWordsInclude(Map<String, String>
columnProperty) {
+ return parseEntryAsString(columnProperty,
FieldConfig.TEXT_INDEX_STOP_WORD_INCLUDE_KEY);
+ }
+
+ @Nullable
+ public static List<String> extractStopWordsExclude(Map<String, String>
columnProperty) {
+ return parseEntryAsString(columnProperty,
FieldConfig.TEXT_INDEX_STOP_WORD_EXCLUDE_KEY);
+ }
+
+ @Nullable
+ public static List<String> parseEntryAsString(@Nullable Map<String, String>
columnProperties,
Review Comment:
This is private helper ?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]