es search
Posted aqiuboke
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了es search相关的知识,希望对你有一定的参考价值。
query string search
GET /goods/produce/_search
>>>
{
"took": 44, #耗费了几毫秒
"timed_out": false, #是否超时
"_shards": { #数据拆成了5个分片,所以对于搜索请求,会打到所有的primary shard(或者是它的某个replica shard也可以)
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": "goods",
"_type": "produce",
"_id": "1",
"_score": 1,
"_source": {
"name": "高露洁牙膏",
"desc": "高露洁美白,口气清新,防蛀牙",
"price": 30,
"producer": "高露洁产品",
"tags": [
"美白",
"防蛀"
]
}
}
]
}
}
以上是关于es search的主要内容,如果未能解决你的问题,请参考以下文章