Last week, Comperio went to the University of Oslo to give the informatics students a brief introduction to elasticsearch and Kibana, so we tweeted and indexed our tweets in addition to many other tweets.
Our tutorial, “smashtime”, is based on Simon Willnauer’s tutorial “hammertime” (hence the name), however we introduced some changes to make it meet our needs, e.g. hammertime uses stream2es to index tweets but we used elasticsearch Twitter River because the latter provides the ability to filter which tweets get indexed based on their hashtags, location etc.
Hammertime ‘automates’ everything, meaning that two bash scripts will do the work for you: run elasticsearch, index tweets, query, and start Kibana. In smashtime, however, we wanted the students to learn how to run elasticsearch and Kibana, so our bash script will only download and configure elasticsearch together with a couple of elasticsearch plugins.
Smashtime went fairly well, most students were able to join our cluster and query the twitter index.
We started the tutorial with indexing some ‘fake’ tweets using cURL requests. Then, we moved on to querying real tweets using match, phrase, and Boolean queries. After that, we showed how fast filters can be and how one can use facets to know who is tweeting on Justin Bieber, bah. Lastly, but perhaps most interestingly, we made sense of our tweets using Kibana, again, thanks to Simon’s hammertime dashboard.
In addition to introducing elasticsearch and Kibana, we used Sense, a very useful, JSON aware tool* to send queries to elasticsearch. Among other things, Sense has a great autocomplete feature, if you haven’t tried it before, check it out!
We are looking forward to more workshops and tutorials on elasticsearch. We know, for Search.
*Sense is actually a chrome extension, but if you clone the repo you should be able to run it in any browser and you can also install as an elasticsearch plugin.