Commit a3046430 authored by 李小芳's avatar 李小芳

Merge branch 'add_hauxiang' into 'master'

修改es

See merge request !7
parents c2ef6bed 48a4bf3d
...@@ -95,7 +95,7 @@ def es_query(doc, body, offset, size, es=None): ...@@ -95,7 +95,7 @@ def es_query(doc, body, offset, size, es=None):
es = get_es() es = get_es()
index = es_index_adapt( index = es_index_adapt(
index_prefix=settings.ES7_HOSTS, index_prefix=settings.ES_INDEX_PREFIX,
doc_type=doc, doc_type=doc,
rw='read' rw='read'
) )
...@@ -103,7 +103,7 @@ def es_query(doc, body, offset, size, es=None): ...@@ -103,7 +103,7 @@ def es_query(doc, body, offset, size, es=None):
res = es.search( res = es.search(
index=index, index=index,
doc_type=doc, doc_type=doc,
timeout=settings.ES7_HOSTS, timeout=settings.ES_SEARCH_TIMEOUT,
body=body, body=body,
from_=offset, from_=offset,
size=size) size=size)
...@@ -115,7 +115,7 @@ def es_query_service(doc, body, offset, size, es=None): ...@@ -115,7 +115,7 @@ def es_query_service(doc, body, offset, size, es=None):
es = get_service_es() es = get_service_es()
index = es_index_adapt( index = es_index_adapt(
index_prefix=settings.ES7_HOSTS_SERVICE, index_prefix=settings.ES_INDEX_PREFIX,
doc_type=doc, doc_type=doc,
rw='read' rw='read'
) )
...@@ -123,7 +123,7 @@ def es_query_service(doc, body, offset, size, es=None): ...@@ -123,7 +123,7 @@ def es_query_service(doc, body, offset, size, es=None):
res = es.search( res = es.search(
index=index, index=index,
doc_type=doc, doc_type=doc,
timeout=settings.ES7_HOSTS_SERVICE, timeout=settings.ES_SEARCH_TIMEOUT,
body=body, body=body,
from_=offset, from_=offset,
size=size) size=size)
......
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