elasticsearch的python接口使用
来源:互联网 发布:php导出数据到excel 编辑:程序博客网 时间:2024/06/05 04:35
elasticsearch-py
Installationedit
It can be installed with pip:
pip install elasticsearch
The legacy version for Elasticsearch version 2.x can be installed with pip:
pip install elasticsearch2
Current development happens in the master branch.
The master branch is the only branch under current development andis used to track all the changes for Elasticsearch 5.x and beyond.
Elasticsearch version 2.x is not longer under active development.We will only backport severe bug fixes.
The recommended way to set your requirements in your setup.py
orrequirements.txt
is:
# Elasticsearch 5.x elasticsearch>=5.0.0,<6.0.0 # Elasticsearch 2.x elasticsearch2
Simple use-case:
>>> from datetime import datetime>>> from elasticsearch import Elasticsearch# by default we connect to localhost:9200>>> es = Elasticsearch()# datetimes will be serialized>>> es.index(index="my-index", doc_type="test-type", id=42, body={"any": "data", "timestamp": datetime.now()}){u'_id': u'42', u'_index': u'my-index', u'_type': u'test-type', u'_version': 1, u'ok': True}# but not deserialized>>> es.get(index="my-index", doc_type="test-type", id=42)['_source']{u'any': u'data', u'timestamp': u'2013-05-12T19:45:31.804229'}
阅读全文
0 0
- elasticsearch的python接口使用
- Python-ElasticSearch的使用
- python下使用elasticsearch
- ElasticSearch的head插件中如何使用cat接口
- ElasticSearch下的REST接口
- Elasticsearch上手——Python API的简单使用
- PHP ElasticSearch的使用
- ElasticSearch的使用
- Elasticsearch的script使用
- Elasticsearch的基本使用
- elasticsearch sql的使用
- PHP ElasticSearch的使用
- elasticsearch的使用
- ElasticSearch查询的使用
- elasticsearch UpdateByQuery的使用
- Elasticsearch的使用场景
- ElasticSearch的使用
- 使用Elasticsearch的java api,操作elasticsearch
- 我们物联网专业的嵌入式实习-day08、09、10(开发智能家居系统-项目制作及总结)
- postman测试Node编写的post接口时产生的错误
- 「转」Android如何防止apk程序被反编译
- 6.13
- [Java基础要义] HashMap的设计原理和实现分析
- elasticsearch的python接口使用
- 转换CRSM返回值到ril上层可处理字串的方法
- 联系人Contact类解析
- 让服务器iis支持.apk文件下载的设置方法
- Android4.0中的按键设备分析
- android区分pad还是phone设备
- [转]Android平台根据分辨率计算屏幕尺寸,基于物理尺寸来验证手机和平板应用合并的可行性
- from torch._C import * ImportError: numpy.core.multiarray failed to import
- [转]android SystemClock设置系统时间需要system权限