airborne12 commented on code in PR #15998: URL: https://github.com/apache/doris/pull/15998#discussion_r1071800210
########## be/src/olap/rowset/segment_v2/inverted_index_reader.cpp: ########## @@ -47,29 +48,38 @@ bool InvertedIndexReader::indexExists(io::Path& index_file_path) { return exists; } -std::vector<std::string> FullTextIndexReader::get_analyse_result( - const std::wstring& field_name, const std::wstring& value, - InvertedIndexQueryType query_type, InvertedIndexParserType analyser_type) { - std::vector<std::string> analyse_result; +std::vector<std::wstring> FullTextIndexReader::get_analyse_result( + const std::wstring& field_name, const std::string& value, InvertedIndexQueryType query_type, + InvertedIndexParserType analyser_type) { + std::vector<std::wstring> analyse_result; std::shared_ptr<lucene::analysis::Analyzer> analyzer; + std::unique_ptr<lucene::util::Reader> reader; if (analyser_type == InvertedIndexParserType::PARSER_STANDARD) { analyzer = std::make_shared<lucene::analysis::standard::StandardAnalyzer>(); + reader.reset( + (new lucene::util::StringReader(std::wstring(value.begin(), value.end()).c_str()))); + } else if (analyser_type == InvertedIndexParserType::PARSER_CHINESE) { + analyzer = std::make_shared<lucene::analysis::LanguageBasedAnalyzer>(L"chinese", false); Review Comment: need to set dict path for chinese analyzer here -- 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