Book Image

Solr Cookbook - Third Edition - Third Edition

By : Rafal Kuc
Book Image

Solr Cookbook - Third Edition - Third Edition

By: Rafal Kuc

Overview of this book

This book is for intermediate Solr Developers who are willing to learn and implement Pro-level practices, techniques, and solutions. This edition will specifically appeal to developers who wish to quickly get to grips with the changes and new features of Apache Solr 5.
Table of Contents (18 chapters)
Solr Cookbook Third Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Handling time-sliced data using aliases


There are situations in which time-sliced data is the only logical solution to go for. For example, if you are indexing logs to your SolrCloud cluster, you probably want to divide the data in time slices depending on how much data you have—if you only have index logs with error level, then you can probably live with monthly collections. If you are indexing all logs from all your applications, daily collections will probably be the way to go. With the time-sliced collections, there are a few things that the application needs to handle; for example, knowing to which collection it should currently send data to and which collection or collections should be used for querying. To simplify this, Solr allows you to use aliases and this recipe will show you how to handle that.

Getting ready

We assume that we already have our configuration stored in ZooKeeper and we have created a SolrCloud cluster. If you don't know how to do this, refer to the Creating a new...