[opt](inverted index) set support_phrase default true if parser is set (#38028)

## Proposed changes

https://github.com/apache/doris/pull/37949

<!--Describe your changes.-->
This commit is contained in:
zzzxl
2024-07-18 08:07:16 +08:00
committed by GitHub
parent 38885d4b00
commit b16cd30a20
4 changed files with 17 additions and 10 deletions

View File

@ -73,9 +73,16 @@ public class Index implements Writable {
this.comment = comment;
if (indexType == IndexDef.IndexType.INVERTED) {
if (this.properties != null && !this.properties.isEmpty()) {
String key = InvertedIndexUtil.INVERTED_INDEX_PARSER_LOWERCASE_KEY;
if (!properties.containsKey(key)) {
this.properties.put(key, "true");
if (this.properties.containsKey(InvertedIndexUtil.INVERTED_INDEX_PARSER_KEY)) {
String lowerCaseKey = InvertedIndexUtil.INVERTED_INDEX_PARSER_LOWERCASE_KEY;
if (!properties.containsKey(lowerCaseKey)) {
this.properties.put(lowerCaseKey, "true");
}
String supportPhraseKey = InvertedIndexUtil
.INVERTED_INDEX_SUPPORT_PHRASE_KEY;
if (!properties.containsKey(supportPhraseKey)) {
this.properties.put(supportPhraseKey, "true");
}
}
}
}