Elasticsearch Query Studio


Seed Elasticsearch

Elasticsearch doesn’t have any data in it first, so we will first need to run a script to seed the data for our studio.

You will want to run tweets.sh which will create the index and fill it with some dummy data.

Your Tasks

Now you’ll get some practice with Elasticsearch. Carry out each of the following tasks. Once you have a successful query/command for each, save the commend in a .txt file for submission

  1. Get information about the twitter index
  2. Fetch the first 10 documents of the index
  3. Fetch the last 10 documents of the index
  4. Add a document to the index
  5. Fetch the document that you just added
  6. Delete the document that you just added from the index
  7. Get all tweets by John Smith
  8. Get the average number of likes for all tweets

The Walkthrough: Elasticsearch prepared you for most of these tasks, however you may need to reference the Elasticsearch documentation, and work with your fellow classmates to answer all the questions!