airborne12 commented on code in PR #46310:
URL: https://github.com/apache/doris/pull/46310#discussion_r1901593590


##########
be/src/olap/rowset/segment_v2/inverted_index_reader.cpp:
##########
@@ -292,19 +292,22 @@ Status FullTextIndexReader::query(const io::IOContext* 
io_ctx, OlapReaderStatist
     VLOG_DEBUG << column_name << " begin to search the fulltext index from 
clucene, query_str ["
                << search_str << "]";
 
+    const auto& queryOptions = runtime_state->query_options();
     try {
         InvertedIndexQueryInfo query_info;
         InvertedIndexQueryCache::CacheKey cache_key;
         auto index_file_key = 
_inverted_index_file_reader->get_index_file_cache_key(&_index_meta);
 
         if (query_type == InvertedIndexQueryType::MATCH_REGEXP_QUERY) {
-            cache_key = {index_file_key, column_name, query_type, search_str};
+            std::string cache_value = search_str;
+            cache_value += " " + 
std::to_string(queryOptions.inverted_index_max_expansions);

Review Comment:
   For perform consideration, reserve cache_value's size first.



-- 
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]

Reply via email to