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


##########
be/src/olap/rowset/segment_v2/inverted_index_cache.cpp:
##########
@@ -46,7 +46,7 @@ Status 
FulltextIndexSearcherBuilder::build(DorisCompoundReader* directory,
     auto closeDirectory = true;
     auto reader = lucene::index::IndexReader::open(
             directory, config::inverted_index_read_buffer_size, 
closeDirectory);
-    auto index_searcher = 
std::make_shared<lucene::search::IndexSearcher>(reader);
+    auto index_searcher = 
std::make_shared<lucene::search::IndexSearcher>(reader, true);

Review Comment:
   use variable name can make function call more clear. As follows:
   bool close_reader = true;
   auto index_searcher = 
std::make_shared<lucene::search::IndexSearcher>(reader, close_reader);



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