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
C++ algoliadatastoreelasticsearchenterprise-searchfacetingfull-text-searchfuzzy-searchgeosearchin-memoryinstantsearchmerchandisingpineconesearchsearch-enginesemantic-searchsimilarity-searchsite-searchsynonymstypo-tolerancevector-search
Tweak error message.
Kishore Nallan8104ffb583b6
diff --git a/src/collection.cpp b/src/collection.cppindex ebc89de2..21700d3d 100644--- a/src/collection.cpp+++ b/src/collection.cpp@@ -2820,8 +2820,8 @@ Option<bool> Collection::validate_alter_payload(nlohmann::json& schema_changes,}} else {// partial update is not supported for now- return Option<bool>(400, "Field `" + field_name + "` is already part of schema: only "- "field additions and deletions are supported for now.");+ return Option<bool>(400, "Field `" + field_name + "` is already part of the schema: To "+ "change this field, drop it first before adding it back to the schema.");}}}diff --git a/src/core_api.cpp b/src/core_api.cppindex c3bdbbd3..a094769e 100644--- a/src/core_api.cpp+++ b/src/core_api.cpp@@ -203,7 +203,7 @@ bool patch_update_collection(const std::shared_ptr<http_req>& req, const std::shreturn false;}- res->set_200(req->body);+ res->set_200(req_json.dump());return true;}diff --git a/test/collection_schema_change_test.cpp b/test/collection_schema_change_test.cppindex bd7806c2..3e3fcbf4 100644--- a/test/collection_schema_change_test.cpp+++ b/test/collection_schema_change_test.cpp@@ -376,8 +376,8 @@ TEST_F(CollectionSchemaChangeTest, AlterValidations) {auto alter_op = coll1->alter(schema_changes);ASSERT_FALSE(alter_op.ok());- ASSERT_EQ("Field `title` is already part of schema: only field additions and deletions are supported for now.",- alter_op.error());+ ASSERT_EQ("Field `title` is already part of the schema: To change this field, drop it first before adding it "+ "back to the schema.",alter_op.error());// 2. Bad field formatschema_changes = R"({