Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Elasticsearch Server: Second Edition

You're reading from  Elasticsearch Server: Second Edition

Product type Book
Published in Apr 2014
Publisher
ISBN-13 9781783980529
Pages 428 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Elasticsearch Server Second Edition
Credits
About the Author
Acknowledgments
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Getting Started with the Elasticsearch Cluster Indexing Your Data Searching Your Data Extending Your Index Structure Make Your Search Better Beyond Full-text Searching Elasticsearch Cluster in Detail Administrating Your Cluster 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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}