Create the Lucene directory
How to use it To create a Directory instance: Â import org.apache.lucene.store.Directory; import org.infinispan.lucene.InfinispanDirectory; import org.infinispan.Cache; Â Cache cache = // create an Infinispan cache, configured as you like Directory indexDir = new InfinispanDirectory(cache, "indexName"); Â The indexName is a unique key to identify your index. It takes the same role as the path did on filesystem based indexes: you can create several different indexes giving them different names. When you use the same indexName in another instance connected to the same network (or instantiated on the same machine, useful for testing) they will join, form a cluster and share all content. New nodes can be added or removed dynamically, making the service administration very easy and also suited for cloud environments: it's simple to react to load spikes, as adding more memory and CPU power to the search system is done by just starting more nodes.