[optimize](invert index) avoid redundant checks for exist. (#30191)
This commit is contained in:
@ -285,12 +285,6 @@ Status FullTextIndexReader::query(OlapReaderStatistics* stats, RuntimeState* run
|
||||
}
|
||||
}
|
||||
|
||||
// check index file existence
|
||||
if (!indexExists(index_file_path)) {
|
||||
return Status::Error<ErrorCode::INVERTED_INDEX_FILE_NOT_FOUND>(
|
||||
"inverted index path: {} not exist.", index_file_path.string());
|
||||
}
|
||||
|
||||
std::unique_ptr<lucene::search::Query> query;
|
||||
std::wstring field_ws = std::wstring(column_name.begin(), column_name.end());
|
||||
|
||||
@ -575,12 +569,6 @@ Status StringTypeInvertedIndexReader::query(OlapReaderStatistics* stats,
|
||||
stats->inverted_index_query_cache_miss++;
|
||||
}
|
||||
|
||||
// check index file existence
|
||||
if (!indexExists(index_file_path)) {
|
||||
return Status::Error<ErrorCode::INVERTED_INDEX_FILE_NOT_FOUND>(
|
||||
"inverted index path: {} not exist.", index_file_path.string());
|
||||
}
|
||||
|
||||
switch (query_type) {
|
||||
case InvertedIndexQueryType::MATCH_ANY_QUERY:
|
||||
case InvertedIndexQueryType::MATCH_ALL_QUERY:
|
||||
|
||||
Reference in New Issue
Block a user