
elasticsearch
luoganttcc
微信:luogantt2
展开
-
python 读取elasticsearch数据
from elasticsearch import Elasticsearch es = Elasticsearch(['x.x.x.x'], timeout=36000) body1 = {"size": 10000, "query": {"match_all": {}}} res1 = es.search(index="goods",scroll='5m', body=body1) print('###################################原创 2021-10-18 18:26:39 · 485 阅读 · 0 评论 -
深入理解lucene原理
文章链接原创 2019-05-05 11:08:20 · 292 阅读 · 0 评论 -
python elasticsearch 入门教程(四)分析聚合
from datetime import datetime from elasticsearch import Elasticsearch es = Elasticsearch() doc = { 'author': 'kimchy', 'text': 'Elasticsearch: cool. bonsai cool.', 'timestamp': datetime.n...原创 2018-08-07 12:00:09 · 1702 阅读 · 0 评论 -
python elasticsearch 入门教程(三)全文短语搜索
from elasticsearch import Elasticsearch es = Elasticsearch() phrase={ "query" : { "match_phrase" : { "about" : "rock climbing" } } } rt2= es.search(index="megacorp...原创 2018-08-07 11:27:22 · 579 阅读 · 0 评论 -
python elasticsearch 入门教程(二) ---全文搜索
截止目前的搜索相对都很简单:单个姓名,通过年龄过滤。现在尝试下稍微高级点儿的全文搜索——一项 传统数据库确实很难搞定的任务。 搜索下所有喜欢攀岩(rock climbing)的雇员: from elasticsearch import Elasticsearch es = Elasticsearch() all_search={ "query" : { "match"...原创 2018-08-07 11:19:39 · 992 阅读 · 0 评论 -
python elasticsearch 入门教程(一)
写入数据 from elasticsearch import Elasticsearch es = Elasticsearch() body1={ "first_name" : "John", "last_name" : "Smith", "age" : 25, "原创 2018-08-06 23:14:36 · 4527 阅读 · 0 评论 -
elasticsearch python API
yuanwen Elasticsearch启动 # 进入到elasticsearch的bin目录 cd /.../.../elasticsearch-x.x.x/bin # 启动elasticsearch ./elasticsearch 可以再开启另外一个终端,输入一下命令,测试是否启动成功 curl http://localhost:9200/ { "name" : "F37KL...转载 2018-08-06 17:28:23 · 699 阅读 · 0 评论 -
elasticsearch python 查询的两种方法
from elasticsearch import Elasticsearch es = Elasticsearch res1 = es.search(index="2018-07-31", body={"query": {"match_all": {}}}) print(es1) {'_shards': {'failed': 0, 'skipped': 0, 'successful': 5...原创 2018-08-06 17:15:17 · 3616 阅读 · 0 评论 -
python elasticsearch
原文链接 文档:http://elasticsearch-py.readthedocs.io/en/master/ Elasticsearch官方API文档: https://www.elastic.co/guide/en/elasticsearch/reference/current/search.html 两种方式现实Elasticsearch API操作 方式一:安装elastic...转载 2018-08-06 16:16:21 · 184 阅读 · 0 评论 -
elasticsearch 写入数据并查询
#导入相关数据 import tushare as ts import pandas as pd #import elasticsearch as es from datetime import datetime from elasticsearch import Elasticsearch df=ts.get_hist_data('000001') #print(df) df1=df...原创 2018-08-05 22:08:10 · 2866 阅读 · 0 评论 -
正排索引与倒排索引
文章链接转载 2018-08-09 11:13:46 · 1403 阅读 · 0 评论 -
Python Elasticsearch 插入数据
index 这是很简单的一个插入数据的方法,每条数据调用一个index方法,代码如下 from datetime import datetime from elasticsearch import Elasticsearch es = Elasticsearch( "localhost:9200" ) data = { "@timestamp" : datetime.now(...转载 2018-07-26 15:58:08 · 417 阅读 · 1 评论 -
kibana. 登陆
localhost:5601原创 2018-07-26 15:25:47 · 1490 阅读 · 0 评论