Logstash, how to define unique id for tweets?

Good evening, I have the following output in my logstash file

output {
	stdout { codec => dots }
	#stdout { codec => rubydebug }
	#stdout { codec => json }
	elasticsearch {
		hosts => "localhost:9200"
		index => "game"
		document_type => "tweet"
		template => "twitter_template.json"
		template_name => "twitter"
  }

I can get the tweets, and I'm using the rest client in java to access information. But how do I define the ids of each tweet?

I try to access it through the browser:

Http: // localhost: 9200 / game / tweet / id?

Is there any way I can define ids incrementally? Or how do I access a twitter through the browser?

ty

As configured, ES will assign a document id automatically as each event is indexed. If you don't want that you can pick your own id, but it's not clear why you'd want to do that.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.