Import Lucene Indexes
NCache provides you PowerShell cmdlets to import native Lucene indexes to your distributed Lucene cache and copy the indexes from one distributed Lucene cache to another. This section will explain how to use these cmdlets along with some examples. NCache provides these tools to enable flexible and easy index migration for your distributed Lucene caches.
Both of the tools,
Import-DistributedLuceneIndex are only supported for Partitioned Topologies.
If you're using a Partitioned-Replica topology, you must have two times the free space available at the given path (where indexes are being imported), and read/write permissions are enabled on this path.
Import-LuceneIndex cmdlet enables users to load native indexes to distributed Lucene cache to avoid re-indexing of required data.
Make sure your cache(s) is stopped and NCache Service is running.
Examples of Import-LuceneIndex
- This example command loads native Lucene index from C:\Index to a distributed Lucene store demoCache
Import-LuceneIndex -CacheName demoCache -Path C:\Index -Server 22.214.171.124
The Import-DistributedLuceneIndex cmdlet imports distributed Lucene indexes from a distributed Lucene cache to another distributed Lucene cache. This cmdlet overwrites existing named indexes that have already been defined on the cache. If you have the same index name in the source and target cache, then this cmdlet overwrites that index in the target cache. This cmdlet will not work if:
- You don't have enough space on the target location (the cache the indexes are being copied too).
- A state transfer is pending.
Before running this cmdlet, ensure the following:
- NCache service is running on both SourceCache and TargetCache.
- SourceCache and TargetCache nodes are stopped.
Examples of Import-DistributedLuceneIndex
- This example command copies distributed Lucene index from SourceCache located at server 126.96.36.199 to TargetCache located at server 188.8.131.52.
Import-DistributedLuceneIndex -SourceCache sourceCache -TargetCache targetCache -SourceCacheServer 184.108.40.206 -TargetCacheServer 220.127.116.11