* As a first thing, we need a stream of tweets which we can parse and extract
* only the text and its id. As you will notice, we're going to store the stream
* using the {@link ElasticSearchState} implementation using its {@link StateUpdater}.
* Check their implementations for details.
*/
topology
.newStream("tweets", spout)
.each(new Fields("str"), new ParseTweet(), new Fields("text", "content", "user"))
.each(new Fields("text", "content"), new TweetIdExtractor(), new Fields("tweetId"))
.project(new Fields("tweetId", "text"))
.each(new Fields("tweetId", "text"), new Print())