【Elasticsearch Postman版】完全匹配(精准匹配)

1.请求方式:GET

2.请求URL:?

http://127.0.0.1:9200/shopping/_search

3.请求参数:

match_phrase

{
    "query" : {
        "match_phrase" : {
            "category" : "红米"
        }
    },
    "from" : 0,
    "size" : 10,
    "_source" : ["title", "category", "price"],
    "sort" : {
        "price" : {
            "order" : "desc"
        }
    }

}

4.响应信息

{
    "took": 2,
    "timed_out": false,
    "_shards": {
        "total": 1,
        "successful": 1,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": {
            "value": 1,
            "relation": "eq"
        },
        "max_score": null,
        "hits": [
            {
                "_index": "shopping",
                "_type": "_doc",
                "_id": "1002",
                "_score": null,
                "_source": {
                    "price": 9999.0,
                    "title": "红米手机",
                    "category": "红米"
                },
                "sort": [
                    9999.0
                ]
            }
        ]
    }
}

【Elasticsearch Postman版】完全匹配(精准匹配)

?

【Elasticsearch Postman版】完全匹配(精准匹配)

上一篇:API之封装动画函数


下一篇:centos通过yum安装jdk8