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.

How to make your index smaller

There may be situations where you would like to make your index smaller. The reasons may be different—you may want to have a smaller index so that it would fit into the operating system's I/O cache or you want to store your index in RAMDirectory. This recipe will try to help you with the process of index slimming.

How to do it...

The following steps tell us how to make your index smaller:

For the purpose of this recipe, I assumed that we will have four fields that describe the document. I created the following index structure (add this to your schema.xml file):