public class DirectoryBuilderImpl extends Object implements BuildContext
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BUFFER_SIZE
Used as default chunk size: each Lucene index segment is split into smaller parts having a default size in bytes as
defined here
|
Constructor and Description |
---|
DirectoryBuilderImpl(Cache<?,?> metadataCache,
Cache<?,?> chunksCache,
Cache<?,?> distLocksCache,
String indexName) |
Modifier and Type | Method and Description |
---|---|
BuildContext |
chunkSize(int bytes)
Sets the chunkSize option for the Directory being created.
|
org.apache.lucene.store.Directory |
create()
Creates a Directory instance
|
BuildContext |
overrideSegmentReadLocker(SegmentReadLocker srl)
Overrides the default SegmentReadLocker.
|
BuildContext |
overrideWriteLocker(org.apache.lucene.store.LockFactory lockFactory)
Overrides the IndexWriter LockFactory
|
public static final int DEFAULT_BUFFER_SIZE
public org.apache.lucene.store.Directory create()
BuildContext
create
in interface BuildContext
Directory
public BuildContext chunkSize(int bytes)
BuildContext
chunkSize
in interface BuildContext
bytes
- segments are fragmented in chunkSize bytes; larger values are more efficient for searching but less for
distribution and network replicationpublic BuildContext overrideSegmentReadLocker(SegmentReadLocker srl)
BuildContext
overrideSegmentReadLocker
in interface BuildContext
srl
- the new read locking strategy for fragmented segmentsorg.infinispan.lucene.readlocks
public BuildContext overrideWriteLocker(org.apache.lucene.store.LockFactory lockFactory)
BuildContext
overrideWriteLocker
in interface BuildContext
lockFactory
- the LockFactory to be used by IndexWriters.org.infinispan.lucene.locking
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.