From 3f40938125781eb4915933a35ea1f7cbc6379b2d Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Thu, 6 Apr 2017 17:27:37 -0700 Subject: [PATCH] rgw: add missing custom meta map initialization Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_sync_module_es_rest.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_sync_module_es_rest.cc b/src/rgw/rgw_sync_module_es_rest.cc index 82edd61d4eb..db2183b3b42 100644 --- a/src/rgw/rgw_sync_module_es_rest.cc +++ b/src/rgw/rgw_sync_module_es_rest.cc @@ -185,7 +185,11 @@ void RGWMetadataSearchOp::execute() static set restricted_fields = { {"permissions"} }; es_query.set_restricted_fields(&restricted_fields); - static map custom_map = { }; + map custom_map; + for (auto& i : s->bucket_info.mdsearch_config) { + custom_map[i.first] = (ESEntityTypeMap::EntityType)i.second; + } + ESEntityTypeMap em(custom_map); es_query.set_custom_type_map(&em);