Commit f964aa00 authored by 段英荣's avatar 段英荣

Merge branch 'similar_sort' into 'master'

modify index mapping

See merge request alpha/physical!144
parents 2ef62259 3ce6f398
......@@ -39,17 +39,16 @@ class Command(BaseCommand):
if len(options["type"]):
if type_name==options["type"]:
ESPerform.put_index_mapping(es_cli, type_name, force_sync=True)
# ESPerform.put_index_mapping(es_cli, type_name, force_sync=True)
official_index_name = ESPerform.get_official_index_name(type_name)
index_exists = es_cli.indices.exists(official_index_name)
if not index_exists:
logging.info("begin create [%s] index!" % type_name)
ESPerform.create_index(es_cli,type_name)
# official_index_name = ESPerform.get_official_index_name(type_name)
# index_exists = es_cli.indices.exists(official_index_name)
# if not index_exists:
# logging.info("begin create [%s] index and mapping!" % type_name)
# ESPerform.create_index(es_cli,type_name)
# ESPerform.put_index_mapping(es_cli,type_name)
# else:
# logging.warning("index:[%s] has already existing!" % type_name)
logging.info("begin create [%s] mapping!" % type_name)
ESPerform.put_index_mapping(es_cli,type_name,force_sync=True)
if len(options["indices_template"]):
......
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