zoukankan      html  css  js  c++  java
  • Elasticsearch 多字段高亮字段返回json

    {
        "took": 5,
        "timed_out": false,
        "_shards": {
            "total": 1,
            "successful": 1,
            "skipped": 0,
            "failed": 0
        },
        "hits": {
            "total": {
                "value": 3,
                "relation": "eq"
            },
            "max_score": null,
            "hits": [
                {
                    "_index": "test-1",
                    "_type": "_doc",
                    "_id": "5",
                    "_score": null,
                    "_source": {
                        "name": "flink开发编辑",
                        "createdate": "2021-09-09 10:32:19",
                        "id": "5",
                        "content": "flink开发"
                    },
                    "highlight": {
                        "name": [
                            "flink<span style='color:#29bf9d'>开发</span>编辑"
                        ],
                        "content": [
                            "flink<span style='color:#29bf9d'>开发</span>"
                        ]
                    },
                    "sort": [
                        "2021-09-09 10:32:19"
                    ]
                },
                {
                    "_index": "test-1",
                    "_type": "_doc",
                    "_id": "4",
                    "_score": null,
                    "_source": {
                        "name": "python开发编辑",
                        "createdate": "2021-09-08 21:19:19",
                        "id": "4",
                        "content": "python开发"
                    },
                    "highlight": {
                        "name": [
                            "python<span style='color:#29bf9d'>开发</span>编辑"
                        ],
                        "content": [
                            "python<span style='color:#29bf9d'>开发</span>"
                        ]
                    },
                    "sort": [
                        "2021-09-08 21:19:19"
                    ]
                },
                {
                    "_index": "test-1",
                    "_type": "_doc",
                    "_id": "3",
                    "_score": null,
                    "_source": {
                        "name": "Web开发Session超时设置",
                        "createdate": "2020-04-21 21:19:19",
                        "id": "3",
                        "content": "Web开发Session超时设置"
                    },
                    "highlight": {
                        "name": [
                            "Web<span style='color:#29bf9d'>开发</span>Session超时设置"
                        ],
                        "content": [
                            "Web<span style='color:#29bf9d'>开发</span>Session超时设置"
                        ]
                    },
                    "sort": [
                        "2020-04-21 21:19:19"
                    ]
                }
            ]
        }
    }
  • 相关阅读:
    php 类文件加载 Autoloader
    windows下配置nginx+php
    crontab 定时调度
    PHP 常见语法 集合
    php socket
    tengine + mysql + nginx + php
    yii2 [行为] behaviors 拦截器
    .htaccess 语法以及应用
    nginx 安装
    Nginx HTTP负载均衡和反向代理配置
  • 原文地址:https://www.cnblogs.com/Jeely/p/15263265.html
Copyright © 2011-2022 走看看