In this studio you will practice working with indices (deleting, re-indexing) and mappings. You will also run some filtered and geo queries on Elasticsearch.
We will be working with the same data set as yesterday for /tweets. However, we are adding location data for our tweets.
Use the tweets-geo.sh` script to create a new index: /tweets_geo.
Look over the script as it may help you with your tasks.
The script isn’t complete as you will need to figure out the request to create the appropriate mapping. Looking over the baseball-teams-stadium.sh script will be beneficial. It’s the second task in the list below.
Carry out each of the following tasks. Once you have a successful query for each, save the command in a .txt file for submission.
location field in the twitter_geo index? What should it be?location by editing tweets_geo.sh to explicitly map location as a geo_point field. Hint: To build the JSON that you’ll need to create the new mapping for twitter_geo, you can copy the response from fetching the mapping for twitter and modify it.