public abstract class AbstractLuceneIndex extends Object implements Closeable
partitions.| Constructor and Description |
|---|
AbstractLuceneIndex(PartitionedIndexStorage indexStorage,
org.neo4j.function.Factory<org.apache.lucene.index.IndexWriterConfig> writerConfigFactory) |
| Modifier and Type | Method and Description |
|---|---|
IndexPartition |
addNewPartition()
Add new partition to the index.
|
LuceneAllDocumentsReader |
allDocumentsReader()
Creates an iterable over all
documents 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()
Commits all index partitions.
|
IndexPartition |
getFirstPartition(List<IndexPartition> partitions) |
List<IndexPartition> |
getPartitions() |
boolean |
hasSinglePartition(List<IndexPartition> 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, org.neo4j.function.Factory<org.apache.lucene.index.IndexWriterConfig> writerConfigFactory)
public void create()
throws IOException
Index creation do not automatically open it. To be able to use index please open it first.
IOExceptionpublic void open()
throws IOException
IOExceptionpublic boolean isOpen()
public boolean exists()
throws IOException
IOExceptionpublic boolean isValid()
public void drop()
throws IOException
IOExceptionpublic void flush()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic LuceneAllDocumentsReader allDocumentsReader()
documents in all partitions.public org.neo4j.graphdb.ResourceIterator<File> snapshot() throws IOException
IOExceptionLuceneIndexSnapshotFileIteratorpublic void maybeRefreshBlocking()
throws IOException
IOExceptionpublic List<IndexPartition> getPartitions()
public boolean hasSinglePartition(List<IndexPartition> partitions)
public IndexPartition getFirstPartition(List<IndexPartition> partitions)
public IndexPartition addNewPartition() throws IOException
IOExceptionCopyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.