您当前的位置: 首页 > 慢生活 > 程序人生 网站首页程序人生
elasticSearch的URI搜索-q查询
发布时间:2021-09-02 15:28:08编辑:雪饮阅读()
ElasticSearch中基于URI的搜索,可以直接在URI路径上拼接参数进行搜索,像是这里最简单的q参数。
请求体:none
响应体:
{
"took": 415,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 1,
"relation": "eq"
},
"max_score": 1.6739764,
"hits": [
{
"_index": "my-index-0000010",
"_type": "_doc",
"_id": "question1",
"_score": 1.6739764,
"_source": {
"name": "Parent School1",
"description": "CBSE Affiliation",
"street": "Nagan",
"city": "paprola",
"state": "HP",
"zip": "176115",
"location": [
31.8955385,
76.8380405
],
"fees": 2200,
"tags": [
"Senior Secondary",
"beautiful campus"
],
"rating": "3.3",
"my_join_field": {
"name": "question"
}
}
}
]
}
}
这里用了最简单q参数匹配了文档中有关Parent的文档。
关键字词:elasticSearch,URI,q