emit-rs / emit_elasticsearch

Elasticsearch collector for the emit structured logger
Apache License 2.0
0 stars 1 forks source link

Set Id Correctly #8

Open KodrAus opened 8 years ago

KodrAus commented 8 years ago

The index_template should set the _id field to the event's @i field, so you can fetch an event by id.

nblumhardt commented 8 years ago

Hey, I just left a comment about this field on the PR, great minds think alike! ;-)

AFAIK @i will map to _type, not _id - https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-type-field.html

KodrAus commented 8 years ago

Ah I might have to look at the implementation for the hash properly. I thought it was generated from the event body.

I'll look into where I should be storing it :)