1
我想將突出顯示的文本顯示爲突出顯示的文字列表,而不是整個文本或片段。Elasticsearch精確突出顯示
我的查詢是過濾器查詢:
{'doc': {'field_name': text}, "highlight": {
"fields": {
"field_name": {}
}
}, 'size': 100}
例如,默認我收到
field_name: ['some text ...<em>word1</em> ... some text ...<em>word2</em> some text...']
我希望收到:
field_name: ['word1', 'word2']
我該怎麼辦呢?