In this tutorial we explain how to set analyzers and datatypes by default to mappings. First, you need to understand what mapping is. Mapping is the process of defining how a document and its fields are stored and indexed. To be able to treat date fields as dates, numeric fields as numbers, and string fields as full-text or exact value strings, Elasticsearch needs to know what type of data each field contains. This information is included in the mapping. 

Keep reading

It really helps Elasticsearch to index data, particularly if there are dates or timestamps involved. That is why Elasticsearch is very good tool for indexing logs. As you progress with your journey with Elasticsearch, Logstash, and Kibana, you will sometimes encounter the issue of having data that you have already indexed of which you want to change the mapping. This can be done, although you will have to reindex the data.

Most client API's actually have a reindex function and reindexing data is easier than you would think. Let's look at an example of reindexing our data after changing the mapping, while using the Python client API for Elasticsearch to do the reindexing for us.  

Changing mappings can be a big headache if it causes downtime. The question is: does it have to cause downtime? When you decide to make mapping changes, you will have to reindex your data. 

Keep reading

In this part of our Elasticsearch tutorial blog series, we are going to look further into mappings in Elasticsearch. We have seen the basics of index creation and common settings in our previous blog about Dynamic Index Creation. Here, we will go deeper into Elasticsearch mappings in the settings of index creation.

Keep reading

Have you ever spent some time grappling with indexing, querying, or aggregating when dealing with an existing parent/child relationship? Maybe you've tried to cope with translating foreign key relationships or simulating database joins in Elasticsearch.

We frequently hear about these issues here at Qbox, and many of our staff have lent a hand to developers who need to update elements of a list property—or nested property—without updating the entire document.

We've come to realize that many developers are unaware of the parent-child construct, the native capability that is already present in Elasticsearch. It gives you the ability to:

  • Update the parent document without reindexing the children.
  • Get child documents in search request results.
  • Add, change, or delete child documents without affecting the parent—or other children. This is especially useful for large collections of child documents that require frequent changes.

Continue reading to see how your life as a developer might be easier by exploiting the parent-child relationship in Elasticsearch.

Keep reading