Enable nested fields flag should be returned in summary.

This commit is contained in:
Kishore Nallan 2022-09-09 10:49:25 +05:30
parent 56344a20ca
commit 4d86106bc3
2 changed files with 4 additions and 0 deletions

View File

@ -144,6 +144,7 @@ nlohmann::json Collection::get_summary_json() const {
json_response["name"] = name;
json_response["num_documents"] = num_documents.load();
json_response["created_at"] = created_at.load();
json_response["enable_nested_fields"] = enable_nested_fields;
json_response["token_separators"] = nlohmann::json::array();
json_response["symbols_to_index"] = nlohmann::json::array();

View File

@ -780,6 +780,9 @@ TEST_F(CollectionNestedFieldsTest, FieldsWithExplicitSchema) {
ASSERT_TRUE(op.ok());
Collection* coll1 = op.get();
nlohmann::json coll_summary = coll1->get_summary_json();
ASSERT_EQ(1, coll_summary.count("enable_nested_fields"));
auto doc = R"({
"company_names": ["Quick brown fox jumped.", "The red fox was not fast."],
"details": {