Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Elasticsearch Server: Second Edition
  • Table Of Contents Toc
  • Feedback & Rating feedback
Elasticsearch Server: Second Edition

Elasticsearch Server: Second Edition

4.3 (13)
close
close
Elasticsearch Server: Second Edition

Elasticsearch Server: Second Edition

4.3 (13)

Overview of this book

Table of Contents (18 chapters)
close
close
Elasticsearch Server Second Edition
Credits
About the Author
Acknowledgments
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Templates and dynamic templates


In the Mappings configuration section of Chapter 2, Indexing Your Data, we read about mappings, how they are created, and how the type-determining mechanism works. Now we will get into more advanced topics; we will show you how to dynamically create mappings for new indices and how to apply some logic to the templates.

Templates

As we have seen earlier in the book, the index configuration and mappings in particular can be complicated beasts. It would be very nice if there was a possibility of defining one or more mappings once and using them in every newly created index without the need of sending them every time an index is created. Elasticsearch creators predicted this and implemented a feature called index templates. Each template defines a pattern, which is compared to a newly created index name. When both of them match, values defined in the template are copied to the index structure definition. When multiple templates match the name of the newly created...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY