Book Image

Elasticsearch Indexing

By : Huseyin Akdogan
Book Image

Elasticsearch Indexing

By: Huseyin Akdogan

Overview of this book

Beginning with an overview of the way ElasticSearch stores data, you’ll begin to extend your knowledge to tackle indexing and mapping, and learn how to configure ElasticSearch to meet your users’ needs. You’ll then find out how to use analysis and analyzers for greater intelligence in how you organize and pull up search results – to guarantee that every search query is met with the relevant results! You’ll explore the anatomy of an ElasticSearch cluster, and learn how to set up configurations that give you optimum availability as well as scalability. Once you’ve learned how these elements work, you’ll find real-world solutions to help you improve indexing performance, as well as tips and guidance on safety so you can back up and restore data. Once you’ve learned each component outlined throughout, you will be confident that you can help to deliver an improved search experience – exactly what modern users demand and expect.
Table of Contents (15 chapters)
Elasticsearch Indexing
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

The relationship between mapping and relevant search results


It should be understood that how to store documents, control document metadata, data type of a field answer to questions, and so on, is through mapping. Similarly, as stated at the beginning of this chapter, using the mapping mechanism, we have answered how does mapping tokenize a field and analyze the field, it going to be searchable answers to questions, and so on, is also given by the mapping.

Now try to examine this situation closely through a simple scenario. Let's start with indexing that looks as follows:

curl -XPOST localhost:9200/blog/article -d '{"title":"HTML Introduction","category":["HTML"],"content":"HTML is a markup language for describing web documents...","publishdate":"10-01-2013","tags":["html","markup-language"]}'

curl -XPOST localhost:9200/blog/article -d '{"title":"NoSQL Concept and MongoDB","category":["NoSQL","BigData"],"content":"In recent years, we often hear the name of NoSQL as a new star...","publishdate...