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" ] } ] } }
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步