Configure Lucene Query Indexes
This feature is only available in NCache Enterprise Edition.
Lucene is a text search engine which has powerful searching algorithms and a wide range of queries. In order to use Lucene with NCache the user has to plug in NCache module in your Lucene application.
You can configure DistributedLucene using NCache in the following ways:
Using NCache Web Manager
Launch NCache Web Manager by browsing to
<server-ip>:8251(Windows + Linux).
In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache to which the query index will be added. Against the cache name, click on View Details.
Make sure that the cache is stopped.
This opens up the detailed configuration page for the cache. Go to the Advanced Settings tab and click on Full Text Search Index in the left bar.
Check the Enable Lucene Indexing check box.
Specify the path for your indexes to be stored in the box provided in front of Index Path. In case of no path provided, the indexes will be stored on the default path used for indexes.
Default Path: [InstallDir]\lucene\
On the left navigation bar, go to Options.
Under Client Activity Notifications, check the Enable Client Activity Notifications check box.
- Click on Save Changes to apply this configuration to the cache.
NCache also provides the Enable-LuceneIndex cmdlet to enable query indexing.
The following example enables Lucene indexing for demoClusteredCache at default index path (%NCHOME%/lucene).
Enable-LuceneIndex -CacheName demoClusteredCache
To disable Lucene indexing, use the Disable-LuceneIndex cmdlet.
Manually Editing NCache Configuration
Make sure the cache is stopped before making any configuration changes.
Specify the query indexes through config.ncconf by adding the
<query-indexes> tag under the
<cache-settings ...> <query-indexes> <lucene-indexes enabled="True"/> </query-indexes> </cache-settings>
- Once changes are made, start the cache and restart NCache service.