From: Yehuda Sadeh Date: Fri, 7 Apr 2017 00:27:37 +0000 (-0700) Subject: rgw: add missing custom meta map initialization X-Git-Tag: ses5-milestone6~9^2~3^2~31 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3f40938125781eb4915933a35ea1f7cbc6379b2d;p=ceph.git rgw: add missing custom meta map initialization Signed-off-by: Yehuda Sadeh --- 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);