es
  1. search
es
  • analyze
    • 测试分词器
      GET
  • index
    • 创建索引及映射
      PUT
    • 查询索引
      GET
    • 删除索引
      DELETE
    • 修改索引
      PUT
  • doc
    • 创建文档
      POST
    • 查询文档
      GET
    • 删除文档
      DELETE
    • 增量修改
      POST
  • search
    • 查询全部
      GET
    • 单字段匹配
      GET
    • 多字段匹配
      GET
    • 精确匹配
      GET
    • 数值范围[匹配
      GET
    • 得分控制
      GET
    • 组合匹配
      GET
  • setting
    • aggs
      • 等值聚合
      • 平均值聚合
      • 和值聚合
      • 最小值聚合
      • 最大值聚合
    • 分页
      GET
    • 排序
      GET
    • 高亮
      GET
  1. search

多字段匹配

开发中
GET
/user/_search

请求参数

Body 参数application/json
object {0}
示例
{
    "query":{
        "multi_match":{
            "query":"if",
            "fields":["introduce"]
        }
    }
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://hx:9200/user/_search' \
--header 'Content-Type: application/json' \
--data-raw '{
    "query":{
        "multi_match":{
            "query":"if",
            "fields":["introduce"]
        }
    }
}'

返回响应

🟢200成功
application/json
Body
took
integer 
必需
timed_out
boolean 
必需
_shards
object 
必需
total
integer 
必需
successful
integer 
必需
skipped
integer 
必需
failed
integer 
必需
hits
object 
必需
total
object 
必需
max_score
number 
必需
hits
array [object {5}] 
必需
示例
{
    "took": 0,
    "timed_out": true,
    "_shards": {
        "total": 0,
        "successful": 0,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 0,
            "relation": "string"
        },
        "max_score": 0,
        "hits": [
            {
                "_index": "string",
                "_type": "string",
                "_id": "string",
                "_score": 0,
                "_source": {
                    "id": 0,
                    "birth": 0,
                    "email": "string",
                    "gender": 0,
                    "height": 0,
                    "introduce": "string",
                    "isHealth": 0,
                    "firstName": "string",
                    "lastName": "string",
                    "score": 0
                }
            }
        ]
    }
}
上一页
单字段匹配
下一页
精确匹配
Built with