Skip to content

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

Fix compile error

ozanarmagan54e9498b19da
diff --git a/include/collection.h b/include/collection.h
index b6163e07..ecb20c09 100644
--- a/include/collection.h
+++ b/include/collection.h
@@ -523,14 +523,14 @@ public:
const size_t remote_embedding_num_tries = 2,
const std::string& stopwords_set="",
const std::vector<std::string>& facet_return_parent = {},
- const bool converstaion = false,
- const int conversation_model_id = -1,
- const std::string& system_prompt = "",
- int conversation_id = -1,
const std::vector<ref_include_fields>& ref_include_fields_vec = {},
const std::string& drop_tokens_mode = "right_to_left",
const bool prioritize_num_matching_fields = true,
- const bool group_missing_values = true) const;
+ const bool group_missing_values = true,
+ const bool converstaion = false,
+ const int conversation_model_id = -1,
+ const std::string& system_prompt = "",
+ int conversation_id = -1) const;
Option<bool> get_filter_ids(const std::string & filter_query, filter_result_t& filter_result) const;
diff --git a/src/collection.cpp b/src/collection.cpp
index 3e3e40e5..c30ac651 100644
--- a/src/collection.cpp
+++ b/src/collection.cpp
@@ -1409,15 +1409,15 @@ Option<nlohmann::json> Collection::search(std::string raw_query,
const size_t remote_embedding_timeout_ms,
const size_t remote_embedding_num_tries,
const std::string& stopwords_set,
- const std::vector<std::string>& facet_return_parent,=
- const bool conversation,
- const int conversation_model_id,
- const std::string& system_prompt,
- int conversation_id,
+ const std::vector<std::string>& facet_return_parent,
const std::vector<ref_include_fields>& ref_include_fields_vec,
const std::string& drop_tokens_mode,
const bool prioritize_num_matching_fields,
- const bool group_missing_values) const {
+ const bool group_missing_values,
+ const bool conversation,
+ const int conversation_model_id,
+ const std::string& system_prompt,
+ int conversation_id) const {
std::shared_lock lock(mutex);
// setup thread local vars
diff --git a/src/collection_manager.cpp b/src/collection_manager.cpp
index db6bea8d..7310feb5 100644
--- a/src/collection_manager.cpp
+++ b/src/collection_manager.cpp
@@ -1507,14 +1507,14 @@ Option<bool> CollectionManager::do_search(std::map<std::string, std::string>& re
remote_embedding_num_tries,
stopwords_set,
facet_return_parent,
- conversation,
- (conversation_model_id == std::numeric_limits<size_t>::max()) ? -1 : static_cast<int>(conversation_model_id),
- system_prompt,
- (conversation_id == std::numeric_limits<size_t>::max()) ? -1 : static_cast<int>(conversation_id),
ref_include_fields_vec,
drop_tokens_mode_str,
prioritize_num_matching_fields,
- group_missing_values);
+ group_missing_values,
+ conversation,
+ (conversation_model_id == std::numeric_limits<size_t>::max()) ? -1 : static_cast<int>(conversation_model_id),
+ system_prompt,
+ (conversation_id == std::numeric_limits<size_t>::max()) ? -1 : static_cast<int>(conversation_id));
uint64_t timeMillis = std::chrono::duration_cast<std::chrono::milliseconds>(
diff --git a/test/collection_vector_search_test.cpp b/test/collection_vector_search_test.cpp
index 00caa694..6680c70b 100644
--- a/test/collection_vector_search_test.cpp
+++ b/test/collection_vector_search_test.cpp
@@ -2913,7 +2913,7 @@ TEST_F(CollectionVectorTest, TestQAConversation) {
0, spp::sparse_hash_set<std::string>(), {},
10, "", 30, 4, "", 1, "", "", {}, 3, "<mark>", "</mark>", {}, 4294967295UL, true, false,
true, "", false, 6000000UL, 4, 7, fallback, 4, {off}, 32767UL, 32767UL, 2, 2, false, "",
- true, 0, max_score, 100, 0, 0, HASH, 30000, 2, "", {}, true, 0);
+ true, 0, max_score, 100, 0, 0, HASH, 30000, 2, "", {}, {}, "right_to_left", true, true, true, 0);
ASSERT_TRUE(results_op.ok());
diff --git a/test/core_api_utils_test.cpp b/test/core_api_utils_test.cpp
index 174b1780..2bf67884 100644
--- a/test/core_api_utils_test.cpp
+++ b/test/core_api_utils_test.cpp
@@ -1285,7 +1285,7 @@ TEST_F(CoreAPIUtilsTest, TestGetConversations) {
0, spp::sparse_hash_set<std::string>(), {},
10, "", 30, 4, "", 1, "", "", {}, 3, "<mark>", "</mark>", {}, 4294967295UL, true, false,
true, "", false, 6000000UL, 4, 7, fallback, 4, {off}, 32767UL, 32767UL, 2, 2, false, "",
- true, 0, max_score, 100, 0, 0, HASH, 30000, 2, "", {}, true, 0);
+ true, 0, max_score, 100, 0, 0, HASH, 30000, 2, "", {}, {}, "right_to_left", true, true, true, 0);
ASSERT_TRUE(results_op.ok());