xiaokang commented on code in PR #49519:
URL: https://github.com/apache/doris/pull/49519#discussion_r2041266721


##########
be/src/olap/rowset/segment_v2/inverted_index/analyzer/analyzer.cpp:
##########
@@ -73,6 +74,16 @@ std::unique_ptr<lucene::analysis::Analyzer> 
InvertedIndexAnalyzer::create_analyz
         analyzer->initDict(config::inverted_index_dict_path + "/icu");
     } else if (analyser_type == InvertedIndexParserType::PARSER_BASIC) {
         analyzer = std::make_unique<BasicAnalyzer>();
+    } else if (analyser_type == InvertedIndexParserType::PARSER_IK) {
+        auto ik_analyzer = std::make_unique<IKAnalyzer>();
+        ik_analyzer->initDict(config::inverted_index_dict_path + "/ik");
+        auto mode = inverted_index_ctx->parser_mode;
+        if (mode == INVERTED_INDEX_PARSER_SMART) {
+            ik_analyzer->setMode(true);

Review Comment:
   true false mode is not scalable to add new ones.



##########
be/CMakeLists.txt:
##########
@@ -239,6 +239,11 @@ install(DIRECTORY
     ${BASE_DIR}/dict/icu/uax29
     DESTINATION ${OUTPUT_DIR}/dict/icu)
 
+
+install(DIRECTORY
+    ${BASE_DIR}/dict/ik
+    DESTINATION ${OUTPUT_DIR}/dict)

Review Comment:
   DESTINATION ${OUTPUT_DIR}/dict/ik



-- 
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...@doris.apache.org

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


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

Reply via email to