随笔分类 - elastaticsearch
摘要:```pythonimport requestsdef get_(): url = "http://127.0.0.1:9200/indextest/_mapping?pretty" ss = requests.get(url) print(ss) print(ss.content) d = json.loads(ss.content) print(d) ...
阅读全文
摘要:``` # 添加mapping: url -X POST 'http://127.0.0.1:9200/indexName/typeName/_mapping?pretty' -d '{ "typeName": { "properties": { "number": { "type": "string", "index": "not_analyzed" } } } }' # reindex cur
阅读全文
摘要:```python
# 官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html#bulk-routing
* es修改数据:
# update_by_query: def update_order_info_by_id(data_list): update_bod...
阅读全文
摘要:```python # host://{index}/{doc_type}/
## /car_shop/sales/index/aaa/_search ```
阅读全文
摘要:``` python
# 当index=''为空时出现此错误 ```
![](https://img2018.cnblogs.com/blog/1151342/201810/1151342-20181017181833752-2079126239.png)
阅读全文
摘要:```python """ 官方文档:https://www.elastic.co/guide/cn/elasticsearch/guide/current/aggregations.html 官方文档:https://elasticsearch-dsl.readthedocs.io/en/latest/search_dsl.html 参考:https://blog.csdn.net/hanyu...
阅读全文
摘要:```python
# 执行https://www.elastic.co/guide/cn/elasticsearch/guide/current/_aggregation_test_drive.html中的例子时报错Fielddata is disabled on text fields ,只需要在查询的fields后面加上.kewwords即可
# 参考https://blog.csdn.ne...
阅读全文
摘要:```python
# https://elasticsearch-dsl.readthedocs.io/en/latest/
# 文档:https://es.xiaoleilu.com/054_Query_DSL/70_Important_clauses.html # https://www.cnblogs.com/dplearning/p/5975158.html ```
阅读全文