]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add missing custom meta map initialization
authorYehuda Sadeh <yehuda@redhat.com>
Fri, 7 Apr 2017 00:27:37 +0000 (17:27 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 30 May 2017 20:26:53 +0000 (13:26 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_sync_module_es_rest.cc

index 82edd61d4eb0fa2343133f5c250399dea085e1c5..db2183b3b42009e627b99fbabb47b5d80b216ed8 100644 (file)
@@ -185,7 +185,11 @@ void RGWMetadataSearchOp::execute()
   static set<string> restricted_fields = { {"permissions"} };
   es_query.set_restricted_fields(&restricted_fields);
 
-  static map<string, ESEntityTypeMap::EntityType> custom_map = { };
+  map<string, ESEntityTypeMap::EntityType> 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);