zipkin インデックスの作成形式は次のとおりです。
{
"version":17,
"mapping_version":13,
"settings_version":1,
"aliases_version":1,
"routing_num_shards":1024,
"state":"open",
"settings":{
"index":{
"routing":{
"allocation":{
"include":{
"_tier_preference":"data_content"
}
}
},
"number_of_shards":"1",
"provided_name":"zipkin-span-2023-02-02",
"creation_date":"1675296000270",
"number_of_replicas":"1",
"uuid":"ySAa5RIsTiSEHBN8pZv_IA",
"version":{
"created":"7160199"
}
}
},
"mappings":{
"_doc":{
"properties":{
"traceId":{
"fielddata":true,
"type":"text",
"fields":{
"keyword":{
"ignore_above":256,
"type":"keyword"
}
}
},
"shared":{
"type":"boolean"
},
"timestamp_millis":{
"type":"long"
},
"kind":{
"type":"text",
"fields":{
"keyword":{
"ignore_above":256,
"type":"keyword"
}
}
},
"tags":{
"properties":{
"gisq_request_id":{
"type":"text",
"fields":{
"keyword":{
"ignore_above":256,
"type":"keyword"
}
}
},
"method":{
"type":"text",
"fields":{
"keyword":{
"ignore_above":256,
"type":"keyword"
}
}
}
},
"duration":{
"type":"long"
},
"remoteEndpoint":{
"properties":{
"ipv4":{
"type":"text",
"fields":{
"keyword":{
"ignore_above":256,
"type":"keyword"
}
}
},
"port":{
"type":"long"
},
"ipv6":{
"type":"text",
"fields":{
"keyword":{
"ignore_above":256,
"type":"keyword"
}
}
},
"serviceName":{
"type":"text",
"fields":{
"keyword":{
"ignore_above":256,
"type":"keyword"
}
}
}
}
},
"id":{
"type":"text",
"fields":{
"keyword":{
"ignore_above":256,
"type":"keyword"
}
}
},
"timestamp":{
"type":"long"
}
}
}
}
}
用語と一致の違い: 用語は完全一致を表し、検索用語は検索前にセグメント化されません。
ここでは主に、タグの下にネストされた gisq_request_id の型をクエリする方法をクエリしたい
"tags":{ "properties":{ "gisq_request_id":{ "type":"text", "fields":{ "keyword":{ "ignore_above":256, "type":"keyword" } } } ,
テンプレートは、あいまい一致と完全一致クエリを表示する gisq_request_id の 2 つのタイプがあることを知ることができます。
あいまい一致クエリ
方法1
方法 2
完全一致クエリ