Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.9k
[Improve](inverted index) improve match performance without index#24751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -95,13 +95,14 @@ void FunctionTokenize::_do_tokenize(const ColumnString& src_column_string, | ||||||
| dest_offsets.push_back(dest_pos); | ||||||
| continue; | ||||||
| } | ||||||
| std::vector<std::wstring> query_tokens = | ||||||
| auto reader = doris::segment_v2::InvertedIndexReader::create_reader( | ||||||
| &inverted_index_ctx, tokenize_str.to_string()); | ||||||
| std::vector<std::string> query_tokens = | ||||||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: variable 'query_tokens' is not initialized [cppcoreguidelines-init-variables]
Suggested change
| ||||||
| doris::segment_v2::InvertedIndexReader::get_analyse_result( | ||||||
| "tokenize", tokenize_str.to_string(), | ||||||
| doris::segment_v2::InvertedIndexQueryType::MATCH_PHRASE_QUERY, | ||||||
| &inverted_index_ctx); | ||||||
| for (auto token_ws : query_tokens) { | ||||||
| std::string token = lucene_wcstoutf8string(token_ws.data(), token_ws.length()); | ||||||
| reader.get(), inverted_index_ctx.analyzer, "tokenize", | ||||||
| doris::segment_v2::InvertedIndexQueryType::MATCH_PHRASE_QUERY); | ||||||
| for (auto token : query_tokens) { | ||||||
| const size_t old_size = column_string_chars.size(); | ||||||
| const size_t split_part_size = token.length(); | ||||||
| if (split_part_size > 0) { | ||||||
| @@ -158,6 +159,9 @@ Status FunctionTokenize::execute_impl(FunctionContext* /*context*/, Block& block | ||||||
| inverted_index_ctx.parser_mode = get_parser_mode_string_from_properties(properties); | ||||||
| inverted_index_ctx.char_filter_map = | ||||||
| get_parser_char_filter_map_from_properties(properties); | ||||||
| auto analyzer = | ||||||
| doris::segment_v2::InvertedIndexReader::create_analyzer(&inverted_index_ctx); | ||||||
| inverted_index_ctx.analyzer = analyzer.get(); | ||||||
| _do_tokenize(*col_left, inverted_index_ctx, *dest_nested_column, dest_offsets, | ||||||
| dest_nested_null_map); | ||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'str_tokens' is not initialized [cppcoreguidelines-init-variables]