首页 > 其他 > 详细

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

时间:2021-07-02 19:46:54      阅读:16      评论:0      收藏:0      [点我收藏+]

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版】完全匹配(精准匹配)

原文:https://blog.51cto.com/u_14097531/2971960

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!