私は、logstash(基本的にはlogstash- *)で作成された弾性検索indexexによる検索にNESTを使用しようとしています。.net elasticsearch clientを使用してlogstashインデックスを照会する方法は?
私は次のコードでセットアップNESTを持っている:
var result = Client.Search<Logstash>(s => s
.Query(p => p.Term("Message", "*")));
と私は0ヒットを取得:
Node = new Uri("http://localhost:9200");
Settings = new ConnectionSettings(Node);
Settings.DefaultIndex("logstash-*");
Client = new ElasticClient(Settings);
これは私が結果を取得しようとする方法である。ここ http://screencast.com/t/d2FB9I4imE
です私が見つけたいと思うエントリの例:
{
"_index": "logstash-2016.06.20",
"_type": "logs",
"_id": "AVVtswJxpdkh1tFPP9S5",
"_score": null,
"_source": {
"timestamp": "2016-06-20 14:04:55.6650",
"logger": "xyz",
"level": "debug",
"message": "Processed command service method SearchService.SearchBy in 65 ms",
"exception": "",
"url": "",
"ip": "",
"username": "",
"user_id": "",
"role": "",
"authentication_provider": "",
"application_id": "",
"application_name": "",
"application": "ZBD",
"@version": "1",
"@timestamp": "2016-06-20T12:04:55.666Z",
"host": "0:0:0:0:0:0:0:1"
},
"fields": {
"@timestamp": [
1466424295666
]
},
"sort": [
1466424295666
]
}
5.0.0-alpha3バージョンを使用しています。NESTクライアントはalpha2 version atmです。