Commit 72cf6c00 authored by 李小芳's avatar 李小芳

修改mapping

parent 445e0c6c
......@@ -74,6 +74,7 @@ def load_mapping(doc_type):
def put_mapping(es, index_prefix, doc_type, mapping, delete=False):
print(es)
cl = es.indices
index = es_index_adapt(
index_prefix=index_prefix,
......@@ -111,9 +112,6 @@ def put_mapping(es, index_prefix, doc_type, mapping, delete=False):
import copy
mapping_copy = copy.deepcopy(mapping)
mapping_copy = _mapping_modify(es, doc_type, mapping_copy)
print(mapping_copy)
print(index)
# return cl.put_mapping(index=index, doc_type="_doc", body=mapping_copy)
return cl.put_mapping(index=index, body=mapping_copy)
......
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