From bb4c0af996509eb6d2c7118041bcb30468d44745 Mon Sep 17 00:00:00 2001 From: Harpreet Sangar Date: Wed, 15 Feb 2023 16:48:44 +0530 Subject: [PATCH] Fix rebase error. --- include/collection.h | 8 ++------ include/index.h | 6 +++--- src/collection.cpp | 3 --- src/index.cpp | 1 - 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/include/collection.h b/include/collection.h index 14693473..8d77cfde 100644 --- a/include/collection.h +++ b/include/collection.h @@ -457,16 +457,12 @@ public: Option get_filter_ids(const std::string & filter_query, filter_result_t& filter_result) const; - Option get_reference_filter_ids(const std::string & filter_query, + Option get_reference_filter_ids(const std::string& filter_query, filter_result_t& filter_result, - const std::string & collection_name) const; + const std::string& collection_name) const; Option validate_reference_filter(const std::string& filter_query) const; - Option get_reference_filter_ids(const std::string & filter_query, - const std::string & collection_name, - std::pair& reference_index_ids) const; - Option get(const std::string & id) const; Option remove(const std::string & id, bool remove_from_store = true); diff --git a/include/index.h b/include/index.h index 8742300f..3344b2ed 100644 --- a/include/index.h +++ b/include/index.h @@ -702,9 +702,9 @@ public: const std::string& collection_name, const std::string& reference_helper_field_name) const; - void do_reference_filtering_with_lock(std::pair& reference_index_ids, - filter_node_t* filter_tree_root, - const std::string& reference_helper_field_name) const; + Option do_reference_filtering_with_lock(filter_node_t* const filter_tree_root, + filter_result_t& filter_result, + const std::string & reference_helper_field_name) const; void refresh_schemas(const std::vector& new_fields, const std::vector& del_fields); diff --git a/src/collection.cpp b/src/collection.cpp index 5f3041a6..8ced0cae 100644 --- a/src/collection.cpp +++ b/src/collection.cpp @@ -2572,7 +2572,6 @@ Option Collection::validate_reference_filter(const std::string& filter_que filter_node_t* filter_tree_root = nullptr; Option filter_op = filter::parse_filter_query(filter_query, search_schema, store, doc_id_prefix, filter_tree_root); - if(!filter_op.ok()) { return filter_op; } @@ -3938,8 +3937,6 @@ Option Collection::prune_doc(nlohmann::json& doc, reference_docs.push_back(ref_doc); } - delete[] documents[0].second; - for (const auto &ref_doc: reference_docs) { doc.update(ref_doc); } diff --git a/src/index.cpp b/src/index.cpp index f9ba9f35..e88badc0 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2719,7 +2719,6 @@ Option Index::search(std::vector& field_query_tokens, cons const vector_query_t& vector_query, size_t facet_sample_percent, size_t facet_sample_threshold, const std::string& collection_name) const { - std::shared_lock lock(mutex); filter_result_t filter_result;