Elasticsearch 使用查询表达式搜索
Elasticsearch 全文检索 大约 875 字查询表达式搜索
query
->match
curl -X GET "localhost:9200/megacorp/employee/_search?pretty=true" -H 'Content-Type: application/json' -d'
{
"query" : {
"match" : {
"last_name" : "Smith"
}
}
}
'
返回:
{
"took" : 2,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 1,
"relation" : "eq"
},
"max_score" : 0.2876821,
"hits" : [
{
"_index" : "megacorp",
"_type" : "employee",
"_id" : "1",
"_score" : 0.2876821,
"_source" : {
"first_name" : "John",
"last_name" : "Smith",
"age" : 25,
"about" : "I love to go rock climbing",
"interests" : [
"sports",
"music"
]
}
}
]
}
}
阅读 1198 · 发布于 2019-04-25
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
软考-系统架构设计师:需求分类-需求获取阅读 1359
-
OpenResty 使用 lua-resty-auto-ssl 配置 https 证书阅读 3891
-
Android 权限大全阅读 2203
-
IntelliJ IDEA 选择 Open matching files in associated application后更改打开方式阅读 3726
-
Android LinearLayout 分割线阅读 3266
-
使用 Java8 压缩文件阅读 1797
-
OpenResty 中使用 ngx.share.DICT 完成内存存储阅读 3838
-
PostgreSQL 别名大小写问题阅读 1398
-
Android RadioButton 选中改变颜色阅读 4680
-
JavaScript onbeforeunload 监听页面关闭事件阅读 816