elasticsearch
thorraythorray
这个作者很懒,什么都没留下…
展开
-
elasticsearch-dump的数据导入与导出
导出ES的indexelasticdump --input=http://user:passwd@127.0.0.1:9200/exploit --output=my_index_mapping.json --type=mappingelasticdump --input=http://user:passwd@127.0.0.1:9200/exploit --output=my_index_data.json --type=data导入数据elasticdump --input=my_index原创 2022-03-10 17:39:14 · 2636 阅读 · 0 评论 -
elasticsearch聚合过滤操作
{ "query": { "bool": { "must": [ { "nested": { "path": "teacher", "query": { "bool": { "原创 2021-06-30 21:46:13 · 723 阅读 · 2 评论 -
python es批量插入数据
for form_item in forms.files: logger.info("form_item: %s", form_item) temp = property_file_upload_esbody(task_id, user, form_item) insert_es.append(temp) if len(insert_es) > 200: bulk(es_client, insert_es,...原创 2021-06-26 18:22:40 · 1682 阅读 · 0 评论 -
elasticsearch使用scroll做数据分页
from elasticsearch import Elasticsearches_client = Elasticsearch(hosts=ES_URL, timeout=600)query_data = es_client.search(index="xxx", scroll=scroll_tm, size=es_scroll_size, body=body) if query_data.get("hits").get("hits"): scroll_id = query_d原创 2021-05-27 18:07:03 · 661 阅读 · 0 评论