From 0180650d09118ebe97154998fbe98c69ff96d7d6 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 21 Mar 2017 17:44:56 -0700 Subject: [PATCH] rgw: also dump custom meta entries when doing metadata search Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_sync_module_es_rest.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rgw/rgw_sync_module_es_rest.cc b/src/rgw/rgw_sync_module_es_rest.cc index f0f2ec65c71bd..458e0630265de 100644 --- a/src/rgw/rgw_sync_module_es_rest.cc +++ b/src/rgw/rgw_sync_module_es_rest.cc @@ -210,6 +210,14 @@ public: dump_time(s, "LastModified", &e.meta.mtime); s->formatter->dump_format("ETag", "\"%s\"", e.meta.etag.c_str()); dump_owner(s, e.owner.get_id(), e.owner.get_display_name()); + s->formatter->open_array_section("CustomMetadata"); + for (auto& m : e.meta.custom_str) { + s->formatter->open_object_section("Entry"); + s->formatter->dump_string("Name", m.first.c_str()); + s->formatter->dump_string("Value", m.second); + s->formatter->close_section(); + } + s->formatter->close_section(); s->formatter->close_section(); rgw_flush_formatter(s, s->formatter); }; -- 2.39.5