
es
QQ2856639881
这个作者很懒,什么都没留下…
展开
-
failed to parse date field [2019/1/29 21:21:54] with format [yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||
curl -XPOST 'localhost:9200/xxx/xxx/9999/_update?pretty' -H 'Content-Type: application/json' -d '{"doc":{"organizer":"Roy","fuhe_time":"2019/1/29 21:21:54"}}报错:"failed to parse date field [...原创 2020-01-12 10:57:01 · 5002 阅读 · 0 评论 -
es filter中使用should
搜索 state = 0 或者 state不存在的记录 { "query": { "bool": { "filter": { "bool": { "should": [ { "term": { "state":原创 2019-03-03 13:38:43 · 3066 阅读 · 0 评论 -
es 字段默认设为 keyword 便于查询
改变analyzer的type为keyword1、在elasticsearch.yml中加上index: analysis: analyzer: default: type: keyword或index.analysis.analyzer.default.type: keyword将如上内...原创 2019-03-04 14:16:25 · 9000 阅读 · 0 评论 -
[term] query does not support array of values 应该用terms
select * from table where t_id in (1,2,3,4)对应es查询语句!!!注意,是terms !!! 不是termGET /index/type/_search{ "query": { "terms": { "state": [ 1,2,3,4 ] } }}...原创 2019-03-25 17:39:33 · 5485 阅读 · 0 评论 -
Rejecting mapping update to [XXX] as the final mapping would have more than 1 type
版本 6.4索引1:curl -X PUT "localhost:9200/index1?pretty" -H 'Content-Type: application/json' -d'{ "settings": { "number_of_shards": 1 }, "mappings": { "index1": { ...原创 2019-05-10 04:31:18 · 4364 阅读 · 0 评论 -
es 查询多次成功购买的前100个用户
curl -X GET "localhost:9200/order/_search?pretty" -H 'Content-Type: application/json' -d'{ "query": { "bool": { "filter": [{ "term": { "state.keyword": "1" } }] //成功购买的,state...原创 2019-09-18 18:37:24 · 623 阅读 · 0 评论 -
Elasticsearch 查询超出10000条时
1、参考https://blog.youkuaiyun.com/Misaki_root/article/details/101203647es本身默认限制了查找的量为10000条,即 from+size<=10000解决方法:1、 在config/elasticsearch.yml中添加配置max_result_window: 10000000002、 使用api修改index的配置...原创 2019-10-10 20:19:23 · 4503 阅读 · 0 评论