Commit 915075c6 authored by 李小芳's avatar 李小芳

update_answer

parent 294f0fca
...@@ -38,7 +38,7 @@ def get_es(): ...@@ -38,7 +38,7 @@ def get_es():
'sniff_on_start': False, 'sniff_on_start': False,
'sniff_on_connection_fail': False, 'sniff_on_connection_fail': False,
} }
new_hosts = settings.ES_V2_HOSTS new_hosts = settings.ES6_HOSTS
new_es = Es(hosts=new_hosts, **init_args) new_es = Es(hosts=new_hosts, **init_args)
return new_es return new_es
...@@ -47,7 +47,7 @@ def es_indices_analyze(doc_type, body, es): ...@@ -47,7 +47,7 @@ def es_indices_analyze(doc_type, body, es):
es = get_es() es = get_es()
index = es_index_adapt( index = es_index_adapt(
index_prefix=settings.ES_INDEX_PREFIX, index_prefix=settings.ES6_HOSTS,
doc_type=doc_type, doc_type=doc_type,
rw='read' rw='read'
) )
...@@ -60,7 +60,7 @@ def get_talos_es(): ...@@ -60,7 +60,7 @@ def get_talos_es():
'sniff_on_start': False, 'sniff_on_start': False,
'sniff_on_connection_fail': False, 'sniff_on_connection_fail': False,
} }
talos_hosts = settings.TALOS_ES_HOSTS talos_hosts = settings.ES6_HOSTS
talos_es = Es(hosts=talos_hosts, **init_args) talos_es = Es(hosts=talos_hosts, **init_args)
return talos_es return talos_es
......
...@@ -198,7 +198,7 @@ class TypeInfo(object): ...@@ -198,7 +198,7 @@ class TypeInfo(object):
bulk_actions.append({ bulk_actions.append({
'_op_type': 'index', '_op_type': 'index',
'_index': index, '_index': index,
'_type': index_type, '_type': "_doc",
'_id': data['id'], '_id': data['id'],
'_source': data, '_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