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 Nallan3f8135d4b0f4
diff --git a/include/field.h b/include/field.hindex 75a4797e..d047c97a 100644--- a/include/field.h+++ b/include/field.h@@ -429,7 +429,7 @@ struct field {fallback_field_type = fallback_field.type;num_auto_detect_fields++;} else {- return Option<bool>(400, "The `type` of field `*` is invalid.");+ return Option<bool>(400, "The `type` of field `.*` is invalid.");}fields.emplace_back(fallback_field);diff --git a/src/collection_manager.cpp b/src/collection_manager.cppindex fa0844a8..78439bc7 100644--- a/src/collection_manager.cpp+++ b/src/collection_manager.cpp@@ -301,7 +301,7 @@ Option<Collection*> CollectionManager::create_collection(const std::string& nameif(!fallback_field_type.empty()) {field fallback_field_type_def("temp", fallback_field_type, false);if(!fallback_field_type_def.has_valid_type()) {- return Option<Collection*>(400, std::string("Field `*` has an invalid type."));+ return Option<Collection*>(400, std::string("Field `.*` has an invalid type."));}}diff --git a/test/collection_all_fields_test.cpp b/test/collection_all_fields_test.cppindex 0844fd98..0136b451 100644--- a/test/collection_all_fields_test.cpp+++ b/test/collection_all_fields_test.cpp@@ -46,7 +46,7 @@ TEST_F(CollectionAllFieldsTest, IndexDocsWithoutSchema) {// try to create collection with random fallback field typeauto bad_coll_op = collectionManager.create_collection("coll_bad", 1, fields, "", 0, "blah");ASSERT_FALSE(bad_coll_op.ok());- ASSERT_EQ("Field `*` has an invalid type.", bad_coll_op.error());+ ASSERT_EQ("Field `.*` has an invalid type.", bad_coll_op.error());coll1 = collectionManager.get_collection("coll1").get();if(coll1 == nullptr) {