• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

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.

Note

Both of the tools, Import-LuceneIndex and Import-DistributedLuceneIndex are only supported for Partitioned Topologies.

Import-LuceneIndex

Important

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.

Important

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 20.200.21.11

Import-DistributedLuceneIndex

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.
Important

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 20.200.20.39 to TargetCache located at server 20.200.20.40.
Import-DistributedLuceneIndex -SourceCache sourceCache -TargetCache targetCache -SourceCacheServer 20.200.20.39 -TargetCacheServer 20.200.20.40

See Also

Create Distributed Lucene Cache
Monitor Cache

Back to top Copyright © 2017 Alachisoft