RajaVinoth96 commented on code in PR #18751:
URL: https://github.com/apache/pinot/pull/18751#discussion_r3487594096
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/text/TextIndexType.java:
##########
@@ -86,6 +86,20 @@ public void validate(FieldIndexConfigs indexConfigs,
FieldSpec fieldSpec, TableC
if (textIndexConfig.isEnabled()) {
Preconditions.checkState(fieldSpec.getDataType().getStoredType() ==
FieldSpec.DataType.STRING,
"Cannot create TEXT index on column: %s of stored type other than
STRING", fieldSpec.getName());
+ for (IndexType indexType : List.of(
+ StandardIndexes.bloomFilter(),
+ StandardIndexes.dictionary(),
+ StandardIndexes.inverted(),
+ StandardIndexes.vector(),
+ StandardIndexes.range(),
+ StandardIndexes.json(),
+ StandardIndexes.fst(),
+ StandardIndexes.h3(),
+ StandardIndexes.ifst())) {
+
Preconditions.checkState(indexConfigs.getConfig(indexType).isDisabled(),
+ "Anti pattern to enable both text index and %s on column: %s",
+ indexType.getPrettyName(), fieldSpec.getName());
+ }
Review Comment:
Text index is better of on data dump of text whereas the others are better
off on low cardinality / single string/ numeric values
--
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]