随笔分类 -  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) ... 阅读全文
posted @ 2019-11-26 18:09 nanaindi 阅读(1617) 评论(0) 推荐(0) 编辑
摘要:``` # 添加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 阅读全文
posted @ 2019-08-09 16:32 nanaindi 阅读(395) 评论(0) 推荐(0) 编辑
摘要:```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... 阅读全文
posted @ 2018-11-02 19:03 nanaindi 阅读(5896) 评论(0) 推荐(0) 编辑
摘要:```python # host://{index}/{doc_type}/ ## /car_shop/sales/index/aaa/_search ``` 阅读全文
posted @ 2018-10-23 16:45 nanaindi 阅读(443) 评论(0) 推荐(0) 编辑
摘要:``` python # 当index=''为空时出现此错误 ``` ![](https://img2018.cnblogs.com/blog/1151342/201810/1151342-20181017181833752-2079126239.png) 阅读全文
posted @ 2018-10-17 18:19 nanaindi 阅读(2495) 评论(0) 推荐(0) 编辑
摘要:```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... 阅读全文
posted @ 2018-10-10 14:24 nanaindi 阅读(1665) 评论(0) 推荐(0) 编辑
摘要:```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... 阅读全文
posted @ 2018-10-10 10:54 nanaindi 阅读(288) 评论(0) 推荐(0) 编辑
摘要:```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 ``` 阅读全文
posted @ 2018-10-09 15:08 nanaindi 阅读(501) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示