Commit 78898a43 authored by 李小芳's avatar 李小芳

更新es的配置

parent f512050d
......@@ -184,10 +184,10 @@ class TypeInfo(object):
if not isinstance(es, (list, tuple,)):
es = [es]
# index_type = self.type
index_type = "_doc"
index_type = self.type
if self.type == 'newitemwiki' or self.type == 'collectwiki' or self.type == 'brandwiki' or self.type == 'productwiki':
index_type = '_doc'
index_type = 'newwiki'
index = es_index_adapt(
index_prefix=index_prefix,
......@@ -201,7 +201,7 @@ class TypeInfo(object):
bulk_actions.append({
'_op_type': 'index',
'_index': index,
'_type': index_type,
'_type': "_doc",
'_id': data['id'] + data["wikitype"] * 10000,
'_source': data,
})
......@@ -210,7 +210,7 @@ class TypeInfo(object):
bulk_actions.append({
'_op_type': 'index',
'_index': index,
'_type': index_type,
'_type': "_doc",
'_id': self.name + "_" + str(data["id"]),
'_source': data,
})
......@@ -229,7 +229,7 @@ class TypeInfo(object):
bulk_actions.append({
'_op_type': 'index',
'_index': index,
'_type': index_type,
'_type': "_doc",
'_id': data['id'],
'_source': data,
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment