私は、動的な構造を持つ数千ものドキュメントにわたる全文検索クエリを作成しようとしています。弾性検索:検索された文字列を含むドキュメント内のフィールドをどのように強調表示するのですか?
ただし、ハイライト方法は、特に名前のついたフィールドに対してのみ機能します。
_allまたは_sourceでの検索を使用したい場合は、何も表示されません。
私はすでにさまざまな試みをしていて、「グーグル」にしようとしましたが、成功しませんでした。
基本クエリ:
POST tracking*/_search
{
"query": {
"query_string": {
"query": "[email protected]_te"
}
},
"highlight": {
"require_field_match": false
}
}
が返されます:
"hits": {
"total": 8,
"max_score": 13.482396,
"hits": [
{
"_index": "tracking-2017.01.09",
"_type": "cyclone",
"_id": "[email protected]_te-Messaging.Message.MessageUnpackaged.Request",
"_score": 13.482396,
"_source": {
... truncated ...
"received": "2017-01-09T13:12:14.008Z",
"tags": [],
"@timestamp": "2017-01-09T13:12:14.008Z",
"size": "3169",
"pairing": " [email protected]_te <[email protected]> ErpExJets_RDC1_ProcessPurchaseOrder_9.4.1_20170109131207169 ErpExJets_RDC1_ProcessPurchaseOrder_9.4.1_20170109131207169",
}
},
が、検索文字列がペアリングフィールドにある場合でもノーハイライト。
それはまったく可能ですか?
おかげ レディ