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

Change error code.

Harpreet Sangar08af7beb3f52
diff --git a/src/collection.cpp b/src/collection.cpp
index b43f5218..432b4f76 100644
--- a/src/collection.cpp
+++ b/src/collection.cpp
@@ -1819,7 +1819,7 @@ Option<nlohmann::json> Collection::search(std::string raw_query,
for(const auto& expanded_search_field: expanded_search_fields) {
if (search_schema.count(expanded_search_field) == 0) {
- return Option<nlohmann::json>(400, "Could not find `" + expanded_search_field + "` field in the schema.");
+ return Option<nlohmann::json>(404, "Could not find `" + expanded_search_field + "` field in the schema.");
}
auto search_field = search_schema.at(expanded_search_field);