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
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()
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.
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() throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public LuceneAllDocumentsReader allDocumentsReader()
document
s in all partitions.public org.neo4j.graphdb.ResourceIterator<File> snapshot() throws IOException
IOException
LuceneIndexSnapshotFileIterator
public void maybeRefreshBlocking() throws IOException
IOException
public List<IndexPartition> getPartitions()
public boolean hasSinglePartition(List<IndexPartition> partitions)
public IndexPartition getFirstPartition(List<IndexPartition> partitions)
public IndexPartition addNewPartition() throws IOException
IOException
Copyright © 2002–2016 The Neo4j Graph Database Project. All rights reserved.