pr0b3l
(Andy)
May 31, 2019, 1:32pm
#1
Hello!
I need to get id in previous document.
My query:
query.json
{
"size" : 1,
"sort" : [ {"timestamp": "desc"} ],
"query": {
"query_string": {
"query": "AS:%{[name]}"
}
},
"_id": "%{[@metadata ][_id]}"
}
But i can't get id . What wrong?
Maybe there is another way get _id in previous doc in logstash?
Badger
May 31, 2019, 2:32pm
#2
If you are using an Elasticsearch input you can use the docinfo option to have the input add the document id to each event.
pr0b3l
(Andy)
June 3, 2019, 1:51pm
#4
No, i'm not use input elasticsearch.
system
(system)
closed
July 1, 2019, 1:51pm
#5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.