You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "xiaokang (via GitHub)" <gi...@apache.org> on 2023/06/07 01:56:21 UTC

[GitHub] [doris] xiaokang commented on a diff in pull request #20528: [Fix](inverted index) if range query exceeds CLucene limits, downgrade it from inverted index

xiaokang commented on code in PR #20528:
URL: https://github.com/apache/doris/pull/20528#discussion_r1220690988


##########
be/src/olap/rowset/segment_v2/inverted_index_reader.cpp:
##########
@@ -491,8 +499,15 @@ Status StringTypeInvertedIndexReader::query(OlapReaderStatistics* stats,
                                     result.add(docid);
                                 });
     } catch (const CLuceneError& e) {
-        LOG(WARNING) << "CLuceneError occured, error msg: " << e.what();
-        return Status::Error<ErrorCode::INVERTED_INDEX_CLUCENE_ERROR>();
+        if (_is_range_query(query_type) && e.number() == CL_ERR_TooManyClauses) {
+            LOG(INFO) << "range query term exceeds limits, try to downgrade from inverted index,"
+                      << "column name:" << column_name << " search_str:" << search_str;
+            return Status::Error<ErrorCode::INVERTED_INDEX_FILE_HIT_LIMIT>();

Review Comment:
   suggest a more generic name INVERTED_INDEX_IGNORE_INDEX



##########
be/src/olap/rowset/segment_v2/inverted_index_reader.cpp:
##########
@@ -491,8 +499,15 @@ Status StringTypeInvertedIndexReader::query(OlapReaderStatistics* stats,
                                     result.add(docid);
                                 });
     } catch (const CLuceneError& e) {
-        LOG(WARNING) << "CLuceneError occured, error msg: " << e.what();
-        return Status::Error<ErrorCode::INVERTED_INDEX_CLUCENE_ERROR>();
+        if (_is_range_query(query_type) && e.number() == CL_ERR_TooManyClauses) {
+            LOG(INFO) << "range query term exceeds limits, try to downgrade from inverted index,"

Review Comment:
   WARNING



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org