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

修改mapping

parent 153f4c3f
......@@ -114,9 +114,7 @@ class Command(BaseCommand):
def work(self, es, index_prefix, doc_type, delete=False):
# create index if not exits
create_index(es=es, index_prefix=index_prefix, doc_type=doc_type)
m = load_mapping(doc_type=doc_type)
# reset doc_type for experiment index
if doc_type == "diary_norms_disable":
doc_type = "diary"
......
......@@ -112,10 +112,8 @@ 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(index)
print(doc_type)
print(mapping_copy)
return cl.put_mapping(index=index, body=mapping_copy)
return cl.put_mapping(index=index, doc_type=doc_type, body=mapping_copy,include_type_name=False)
def alias_shift(es, alias, old_index, new_index):
......
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