//匹配所有
{
"query":{
"match_all":{
"title":"瓦力"
}
}
}
//模糊查询
{
"query":{
"match":{
"title":"瓦力"
}
}
}
//精准查询
{
"query":{
"match_phrase":{
"title":"瓦力"
}
}
}
//多字段查询
{
"query":{
"multi_match":{
"query":"瓦力",
"fields":["author","title"]
}
}
}
//使用表达式查询
{
"query":{
"query_string":{
"query":"瓦力 OR ElasticSerch",
"fields":["title","author"]
}
}
}
//字段查询
{
"query":{
"term":{
"word_count":1000
}
}
}
//字段范围查询
{
"query":{
"range":{
"publish_time":{
"gt":"2017-01-01",
"lte":"now"
}
}
}
}
ElasticSearch搜索
最新推荐文章于 2023-07-20 01:48:15 发布