6搜索接口--1搜索

搜索可以横跨多个索引或者多种类型如下:在twitter索引下的所有类型文章搜索
GET /twitter/_search?q=user:kimchy

针对某几个类型进行搜索
GET /twitter/tweet,user/_search?q=user:kimchy

搜索横跨几个index搜索类型为tweet的数据
GET /kimchy,elasticsearch/tweet/_search?q=tag:wow

或者搜索所有索引下类型为tweet的数据
GET /_all/tweet/_search?q=tag:wow

搜索所有索引
GET /_search?q=tag:wow


默认情况下,es拒绝搜索超过1000个数据节。当然也可以修改集群设置
action.search.shard_count.limit

猜你喜欢

转载自fenshen6046.iteye.com/blog/2366685