public abstract class AbstractLuceneIndex extends Object
partitions
.
Class and it's subclasses should not be directly used, instead please use corresponding writable or read only
wrapper.Constructor and Description |
---|
AbstractLuceneIndex(PartitionedIndexStorage indexStorage,
IndexPartitionFactory partitionFactory) |
Modifier and Type | Method and Description |
---|---|
LuceneAllDocumentsReader |
allDocumentsReader()
Creates an iterable over all
document s in all partitions. |
void |
close() |
void |
create()
Creates new index.
|
void |
drop()
Close index and deletes all it's partitions.
|
boolean |
exists()
Check lucene index existence within all allocated partitions.
|
void |
flush(boolean merge)
Commits all index partitions.
|
AbstractIndexPartition |
getFirstPartition(List<AbstractIndexPartition> partitions) |
List<AbstractIndexPartition> |
getPartitions() |
boolean |
hasSinglePartition(List<AbstractIndexPartition> partitions) |
boolean |
isOpen() |
boolean |
isValid()
Verify state of the index.
|
void |
maybeRefreshBlocking()
Refresh all partitions to make newly inserted data visible for readers.
|
void |
open()
Open index with all allocated partitions.
|
org.neo4j.graphdb.ResourceIterator<File> |
snapshot()
Snapshot of all file in all index partitions.
|
public AbstractLuceneIndex(PartitionedIndexStorage indexStorage, IndexPartitionFactory partitionFactory)
public void create() throws IOException
Index creation do not automatically open it. To be able to use index please open it first.
IOException
public void open() throws IOException
IOException
public boolean isOpen()
public boolean exists() throws IOException
IOException
public boolean isValid()
public void drop() throws IOException
IOException
public void flush(boolean merge) throws IOException
merge
- also merge all segments together. This should be done before reading term frequencies.IOException
- on Lucene I/O error.public void close() throws IOException
IOException
public LuceneAllDocumentsReader allDocumentsReader()
document
s in all partitions.public org.neo4j.graphdb.ResourceIterator<File> snapshot() throws IOException
IOException
WritableIndexSnapshotFileIterator
public void maybeRefreshBlocking() throws IOException
IOException
public List<AbstractIndexPartition> getPartitions()
public boolean hasSinglePartition(List<AbstractIndexPartition> partitions)
public AbstractIndexPartition getFirstPartition(List<AbstractIndexPartition> partitions)
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.