rgw: add missing custom meta map initialization

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
Yehuda Sadeh 2017-04-06 17:27:37 -07:00
parent 8bfe1379a1
commit 3f40938125

View 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);