syntax
1
Hi,
Is there a way to retrieve the elasticsearch record ID after the log has been submitted via GELF?
$transport = new TcpTransport("127.0.0.1", 12201);
$publisher = new Publisher();
$publisher->addTransport($transport);
$message = new Message();
$message->setLevel(\Psr\Log\LogLevel::INFO)->setShortMessage($model->desc);
$publisher->publish($message);
gsmith
(GSmith)
2
Hello,
I’m not exactly sure what ID you looking for so I’ll give you a couple examples.
Message ID
Elasticsearch scroll command.
curl -X GET "localhost:9200/_search?scroll=1m&pretty" -H 'Content-Type: application/json' -d'
{
"sort": [
"_doc"
]
}
'
Results
To help you further, some more information about what you want or some examples would be appreciated.
Hope that helps
syntax
3
hi gsmith. thanks for the reply.
i’d like to retrieve the ID right after it has been submitted/published.
$publisher->publish($message);
i.e.
something like,
$getRecordID = $publisher->publish($message);
return $getRecordID;
gsmith
(GSmith)
4
Hello,
I’m unfamiliar with what your doing. I was wondering if you could enlighten me or demonstrate how your executing these commands for Elasticsearch.
system
(system)
Closed
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.