O'Reilly logo

Elasticsearch 5.x Cookbook - Third Edition by Alberto Paro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mapping base types

Using explicit mapping allows to be faster in starting to insert the data using a schema less approach without being concerned of the field types, so as to achieve better results and performance in indexing, it's required to manually define a mapping.

Fine-tuning mapping brings some advantages such as:

  • Reducing the index size on the disk (disabling functionalities for custom fields)
  • Indexing only interesting fields (general speed up)
  • Precooking data for fast search or real-time analytics (such as facets)
  • Correctly defining whether a field must be analyzed in multiple tokens or considered as a single token

Elasticsearch allows using base fields with a wide range of configurations.

Getting ready

You need an up-and-running Elasticsearch ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required