月度归档:2017年01月

els mark

#查询时可选定分片,防止结果由于排序等原因两次不一样

http://172.31.11.182:9200/_search?preference=_primary
http://172.31.11.182:9200/_search?preference=_primary_first
#更多见官方https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-preference.html

#常见url

http://172.31.11.182:9200/_cat/indices?v  #查看所有索引列表

http://172.31.11.182:9200/public/appdiscover/_search  #http://172.31.11.182:9200/索引名/ type名/_search

http://172.31.11.182:9200/public/_search  #查询public索引下的所有数据

http://172.31.11.182:9200/_search  #查看所有数据

http://172.31.11.182:9200/*/appdiscover/_search   #所有索引下的指定type

ttp://172.31.11.182:9200/logstash*/appdiscover/_search   #所有以logstash开头的索引下的指定type

POST:
{sort:{"@timestamp":"asc","kafka.msg_size":"asc"},size:200,from:0,query:{range:{"@timestamp": {from:1484212500000,to:1484212800000}}}}