Hi
i meet a problem when i try to make a search
this request work
curl -XGET http://elasticsearch:9200/logstash-wsnotification_application-2016.05.19/_search?pretty --data-binary '{
"query" : { "match_all" : {} },
"size" : 1,
"_source" : []
}'
resultat
{
"took" : 24,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 2344977,
"max_score" : 1.0,
"hits" : [ {
"_index" : "logstash-wsnotification_application-2016.05.19",
"_type" : "wsnotification_application",
"_id" : "AVTHRg5BEIZomS5yHk60",
"_score" : 1.0,
"_source" : {
"message" : "2016-05-19 06:28:47,235 [27] INFO - RegisterDevice(string appId, string udid, string token, int languageId, string partnerCode) - TimeTaken 00:00:00.0095643",
"@version" : "1",
"@timestamp" : "2016-05-19T04:28:47.235Z",
"beat" : {
"hostname" : "EUISAFR597",
"name" : "EUISAFR597"
},
"count" : 1,
"fields" : null,
"input_type" : "log",
"offset" : 45412754,
"source" : "D:\LogApplicatives\WSNotifications\WSNotifications.log",
"type" : "wsnotification_application",
"host" : "EUISAFR597",
"tags" : [ "beats_input_codec_plain_applied" ],
"Timestamp" : "2016-05-19 06:28:47,235",
"info1" : "[27]",
"Loglevel" : "INFO",
"Action" : "RegisterDevice(string appId, string udid, string token, int languageId, string partnerCode) - TimeTaken 00:00:00.0095643",
"TimeTaken" : 95643
}
} ]
}
}
and this fail
curl -XGET http://elasticsearch:9200/logstash-wsnotification_application-2016.05.19/_search?pretty --data-binary '{
"query" : { "match_all" : {} },
"size" : 1,
"_source" : [ "host" ]
}'
{
"error" : {
"root_cause" : [ {
"type" : "json_parse_exception",
"reason" : "Unrecognized token 'host': was expecting ('true', 'false' or 'null')\n at [Source: [B@417cc95a; line: 4, column: 20]"
}, {
"type" : "json_parse_exception",
"reason" : "json_parse_exception: Unrecognized token 'host': was expecting ('true', 'false' or 'null')\n at [Source: [B@58424628; line: 4, column: 20]"
}, {
"type" : "json_parse_exception",
"reason" : "json_parse_exception: Unrecognized token 'host': was expecting ('true', 'false' or 'null')\n at [Source: [B@76ccb30; line: 4, column: 20]"
} ],
"type" : "search_phase_execution_exception",
"reason" : "all shards failed",
"phase" : "query",
"grouped" : true,
"failed_shards" : [ {
"shard" : 0,
"index" : "logstash-wsnotification_application-2016.05.19",
"node" : "TDasJe89S-eLzmA8s5HI4A",
"reason" : {
"type" : "json_parse_exception",
"reason" : "Unrecognized token 'host': was expecting ('true', 'false' or 'null')\n at [Source: [B@417cc95a; line: 4, column: 20]"
}
}, {
"shard" : 1,
"index" : "logstash-wsnotification_application-2016.05.19",
"node" : "EyeXIc4PTgOTNt8QS7AcMA",
"reason" : {
"type" : "json_parse_exception",
"reason" : "json_parse_exception: Unrecognized token 'host': was expecting ('true', 'false' or 'null')\n at [Source: [B@58424628; line: 4, column: 20]"
}
}, {
"shard" : 3,
"index" : "logstash-wsnotification_application-2016.05.19",
"node" : "EyeXIc4PTgOTNt8QS7AcMA",
"reason" : {
"type" : "json_parse_exception",
"reason" : "json_parse_exception: Unrecognized token 'host': was expecting ('true', 'false' or 'null')\n at [Source: [B@76ccb30; line: 4, column: 20]"
}
} ]
},
"status" : 500
}
Is sombody see the error ?