How it works
Elasticsearch is both a NoSQL database and a search engine. You give documents to Elasticsearch and it parses the data in the documents and creates search indexes for that data automatically.
During the insertion process, we used the elasticsearch libraries' .index() method and specified an index, named "planets", a document type, planets_info, and the finally the body of the document, which is our planet Python object. The elasticsearch library that object to JSON and sends it off to Elasticsearch for storage and indexing.
The index parameter is used to inform Elasticsearch how to create an index, which it will use for indexing and which we can use to specify a set of documents to search for when we query. When we performed ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access