Book Image

Solr Cookbook - Third Edition

By : Rafal Kuc
Book Image

Solr Cookbook - Third Edition

By: Rafal Kuc

Overview of this book

Table of Contents (18 chapters)
Solr Cookbook Third Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using aliasing


Aliasing is the functionality of giving your collections more than a single name. It might seem not very useful, but in fact this is very useful—for example, when dealing with time series data. Imagine that you have data that stores logfiles and as the data is so large, you create a new collection every day. In addition to this, you usually search for the latest or one week worth of data. To simplify indexing and searching, we can use aliasing, and this recipe will show you how to do that.

Getting ready

Before reading further, I would advise you all to read the Creating a new SolrCloud cluster recipe of this chapter. This recipe will show you how to create a new SolrCloud cluster and create a collection. We also assume that ZooKeeper is running on 192.168.1.10 and is listening on port 2181. We already have the configuration called firstcollection stored in ZooKeeper and we already have four SolrCloud nodes running as a cluster.

How to do it...

  1. When we created our cluster, we started...