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
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.
|
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.
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
IOExceptionpublic LuceneAllDocumentsReader allDocumentsReader()
documents in all partitions.public org.neo4j.graphdb.ResourceIterator<File> snapshot() throws IOException
IOExceptionWritableIndexSnapshotFileIteratorpublic void maybeRefreshBlocking()
throws IOException
IOExceptionpublic List<AbstractIndexPartition> getPartitions()
public boolean hasSinglePartition(List<AbstractIndexPartition> partitions)
public AbstractIndexPartition getFirstPartition(List<AbstractIndexPartition> partitions)
Copyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.