You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ai...@apache.org on 2025/10/19 11:35:42 UTC

(doris) branch master updated: [chore](search) remove useless params (#57117)

This is an automated email from the ASF dual-hosted git repository.

airborne pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new c1e72907efd [chore](search) remove useless params (#57117)
c1e72907efd is described below

commit c1e72907efd284a7760e99e13411f43f8d63a1ff
Author: Jack <ji...@selectdb.com>
AuthorDate: Sun Oct 19 19:35:34 2025 +0800

    [chore](search) remove useless params (#57117)
---
 be/src/vec/functions/function_search.cpp | 17 ++++++++---------
 be/src/vec/functions/function_search.h   |  4 ++--
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/be/src/vec/functions/function_search.cpp b/be/src/vec/functions/function_search.cpp
index d53024a0dde..650d637d0a7 100644
--- a/be/src/vec/functions/function_search.cpp
+++ b/be/src/vec/functions/function_search.cpp
@@ -210,7 +210,7 @@ Status FunctionSearch::evaluate_inverted_index_with_search_param(
 
     query_v2::QueryPtr root_query;
     std::string root_binding_key;
-    RETURN_IF_ERROR(build_query_recursive(*this, search_param.root, context, resolver, &root_query,
+    RETURN_IF_ERROR(build_query_recursive(search_param.root, context, resolver, &root_query,
                                           &root_binding_key));
     if (root_query == nullptr) {
         LOG(INFO) << "search: Query tree resolved to empty query, dsl:"
@@ -390,8 +390,7 @@ InvertedIndexQueryType FunctionSearch::clause_type_to_query_type(
     return InvertedIndexQueryType::EQUAL_QUERY;
 }
 
-Status FunctionSearch::build_query_recursive(const FunctionSearch& function,
-                                             const TSearchClause& clause,
+Status FunctionSearch::build_query_recursive(const TSearchClause& clause,
                                              const std::shared_ptr<IndexQueryContext>& context,
                                              FieldReaderResolver& resolver,
                                              inverted_index::query_v2::QueryPtr* out,
@@ -416,8 +415,8 @@ Status FunctionSearch::build_query_recursive(const FunctionSearch& function,
             for (const auto& child_clause : clause.children) {
                 query_v2::QueryPtr child_query;
                 std::string child_binding_key;
-                RETURN_IF_ERROR(build_query_recursive(function, child_clause, context, resolver,
-                                                      &child_query, &child_binding_key));
+                RETURN_IF_ERROR(build_query_recursive(child_clause, context, resolver, &child_query,
+                                                      &child_binding_key));
                 // Add all children including empty BitmapQuery
                 // BooleanQuery will handle the logic:
                 // - AND with empty bitmap → result is empty
@@ -431,10 +430,10 @@ Status FunctionSearch::build_query_recursive(const FunctionSearch& function,
         return Status::OK();
     }
 
-    return build_leaf_query(function, clause, context, resolver, out, binding_key);
+    return build_leaf_query(clause, context, resolver, out, binding_key);
 }
 
-Status FunctionSearch::build_leaf_query(const FunctionSearch& function, const TSearchClause& clause,
+Status FunctionSearch::build_leaf_query(const TSearchClause& clause,
                                         const std::shared_ptr<IndexQueryContext>& context,
                                         FieldReaderResolver& resolver,
                                         inverted_index::query_v2::QueryPtr* out,
@@ -453,7 +452,7 @@ Status FunctionSearch::build_leaf_query(const FunctionSearch& function, const TS
     const std::string& value = clause.value;
     const std::string& clause_type = clause.clause_type;
 
-    auto query_type = function.clause_type_to_query_type(clause_type);
+    auto query_type = clause_type_to_query_type(clause_type);
 
     FieldReaderBinding binding;
     RETURN_IF_ERROR(resolver.resolve(field_name, query_type, &binding));
@@ -474,7 +473,7 @@ Status FunctionSearch::build_leaf_query(const FunctionSearch& function, const TS
         *binding_key = binding.binding_key;
     }
 
-    FunctionSearch::ClauseTypeCategory category = function.get_clause_type_category(clause_type);
+    FunctionSearch::ClauseTypeCategory category = get_clause_type_category(clause_type);
     std::wstring field_wstr = binding.stored_field_wstr;
     std::wstring value_wstr = StringHelper::to_wstring(value);
 
diff --git a/be/src/vec/functions/function_search.h b/be/src/vec/functions/function_search.h
index 45cc398915c..910a8e25936 100644
--- a/be/src/vec/functions/function_search.h
+++ b/be/src/vec/functions/function_search.h
@@ -173,13 +173,13 @@ public:
     // Map clause_type string to InvertedIndexQueryType
     InvertedIndexQueryType clause_type_to_query_type(const std::string& clause_type) const;
 
-    Status build_query_recursive(const FunctionSearch& function, const TSearchClause& clause,
+    Status build_query_recursive(const TSearchClause& clause,
                                  const std::shared_ptr<IndexQueryContext>& context,
                                  FieldReaderResolver& resolver,
                                  inverted_index::query_v2::QueryPtr* out,
                                  std::string* binding_key) const;
 
-    Status build_leaf_query(const FunctionSearch& function, const TSearchClause& clause,
+    Status build_leaf_query(const TSearchClause& clause,
                             const std::shared_ptr<IndexQueryContext>& context,
                             FieldReaderResolver& resolver, inverted_index::query_v2::QueryPtr* out,
                             std::string* binding_key) const;


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