public static final class IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter extends DirectoryTaxonomyWriter
DirectoryTaxonomyWriter
which sets the underlying
IndexWriter
's IndexDeletionPolicy
to
SnapshotDeletionPolicy
.DirectoryTaxonomyWriter.DiskOrdinalMap, DirectoryTaxonomyWriter.MemoryOrdinalMap, DirectoryTaxonomyWriter.OrdinalMap
INDEX_EPOCH
Constructor and Description |
---|
SnapshotDirectoryTaxonomyWriter(Directory d) |
SnapshotDirectoryTaxonomyWriter(Directory directory,
IndexWriterConfig.OpenMode openMode) |
SnapshotDirectoryTaxonomyWriter(Directory directory,
IndexWriterConfig.OpenMode openMode,
TaxonomyWriterCache cache) |
Modifier and Type | Method and Description |
---|---|
protected IndexWriterConfig |
createIndexWriterConfig(IndexWriterConfig.OpenMode openMode)
Create the
IndexWriterConfig that would be used for opening the internal index writer. |
SnapshotDeletionPolicy |
getDeletionPolicy()
Returns the
SnapshotDeletionPolicy used by the underlying IndexWriter . |
IndexWriter |
getIndexWriter()
Returns the
IndexWriter used by this DirectoryTaxonomyWriter . |
protected IndexWriter |
openIndexWriter(Directory directory,
IndexWriterConfig config)
Open internal index writer, which contains the taxonomy data.
|
addCategory, addTaxonomy, close, closeResources, commit, defaultTaxonomyWriterCache, ensureOpen, findCategory, getCommitData, getDirectory, getParent, getSize, getTaxonomyEpoch, prepareCommit, replaceTaxonomy, rollback, setCacheMissesUntilFill, setCommitData
public SnapshotDirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode, TaxonomyWriterCache cache) throws IOException
public SnapshotDirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode) throws IOException
public SnapshotDirectoryTaxonomyWriter(Directory d) throws IOException
IOException
DirectoryTaxonomyWriter.DirectoryTaxonomyWriter(Directory)
protected IndexWriterConfig createIndexWriterConfig(IndexWriterConfig.OpenMode openMode)
DirectoryTaxonomyWriter
IndexWriterConfig
that would be used for opening the internal index writer.
IndexWriter
as they see fit,
including setting a merge-scheduler
, or
deletion-policy
, different RAM size
etc.createIndexWriterConfig
in class DirectoryTaxonomyWriter
openMode
- see IndexWriterConfig.OpenMode
DirectoryTaxonomyWriter.openIndexWriter(Directory, IndexWriterConfig)
protected IndexWriter openIndexWriter(Directory directory, IndexWriterConfig config) throws IOException
DirectoryTaxonomyWriter
Extensions may provide their own IndexWriter
implementation or instance.
NOTE: the instance this method returns will be closed upon calling
to DirectoryTaxonomyWriter.close()
.
NOTE: the merge policy in effect must not merge none adjacent segments. See
comment in DirectoryTaxonomyWriter.createIndexWriterConfig(IndexWriterConfig.OpenMode)
for the logic behind this.
openIndexWriter
in class DirectoryTaxonomyWriter
directory
- the Directory
on top of which an IndexWriter
should be opened.config
- configuration for the internal index writer.IOException
DirectoryTaxonomyWriter.createIndexWriterConfig(IndexWriterConfig.OpenMode)
public SnapshotDeletionPolicy getDeletionPolicy()
SnapshotDeletionPolicy
used by the underlying IndexWriter
.public IndexWriter getIndexWriter()
IndexWriter
used by this DirectoryTaxonomyWriter
.Copyright © 2000–2015 The Apache Software Foundation. All rights reserved.