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

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 10dc4d50a22 branch-4.0: [chore](search) remove useless params #57117 
(#57134)
10dc4d50a22 is described below

commit 10dc4d50a2268fff4fd530548e0b257ad09f34b9
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Oct 20 10:15:59 2025 +0800

    branch-4.0: [chore](search) remove useless params #57117 (#57134)
    
    Cherry-picked from #57117
    
    Co-authored-by: Jack <[email protected]>
---
 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to