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

Don't return nested field details in summary end-points.

Kishore Nallan21f193713849
diff --git a/src/collection.cpp b/src/collection.cpp
index 3259d76c..f514242a 100644
--- a/src/collection.cpp
+++ b/src/collection.cpp
@@ -169,11 +169,6 @@ nlohmann::json Collection::get_summary_json() const {
field_json[fields::sort] = coll_field.sort;
field_json[fields::infix] = coll_field.infix;
field_json[fields::locale] = coll_field.locale;
- field_json[fields::nested] = coll_field.nested;
-
- if(coll_field.nested) {
- field_json[fields::nested_array] = coll_field.nested_array;
- }
if(coll_field.num_dim > 0) {
field_json[fields::num_dim] = coll_field.num_dim;
diff --git a/test/collection_nested_fields_test.cpp b/test/collection_nested_fields_test.cpp
index 685c20db..2fa978e5 100644
--- a/test/collection_nested_fields_test.cpp
+++ b/test/collection_nested_fields_test.cpp
@@ -1165,6 +1165,11 @@ TEST_F(CollectionNestedFieldsTest, FieldsWithExplicitSchema) {
nlohmann::json coll_summary = coll1->get_summary_json();
ASSERT_EQ(1, coll_summary.count("enable_nested_fields"));
+ for(auto& f: coll_summary["fields"]) {
+ ASSERT_EQ(0, f.count(fields::nested));
+ ASSERT_EQ(0, f.count(fields::nested_array));
+ }
+
auto doc = R"({
"company_names": ["Quick brown fox jumped.", "The red fox was not fast."],
"details": {