Searching for data
Now that we understand some of the core aspects of Elasticsearch (shards, indices, index mappings/settings, nodes, and more), let's put it all together by ingesting a sample dataset and searching for data.
Indexing sample logs
Follow these steps to ingest some Apache web access logs into Elasticsearch:
- Navigate to the
Chapter3/searching-for-data
directory in the code repository for this book. Inspect theweb.log
file to see the raw data that we are going to load into Elasticsearch for querying:head web.log
- A Bash script called
load.sh
has been provided for loading two items into your Elasticsearch cluster:
(a) An index template called web-logs-template
that defines the index mappings and settings that are compliant with the Elastic Common Schema:
cat web-logs-template.json
(b) An ingest pipeline called web-logs-pipeline
that parses and transforms logs from your dataset into the Elastic Common Schema:
cat web-logs-pipeline.json...