public static final class IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter extends DirectoryTaxonomyWriter
DirectoryTaxonomyWriter which sets the underlying
IndexWriter's IndexDeletionPolicy to
SnapshotDeletionPolicy.DirectoryTaxonomyWriter.DiskOrdinalMap, DirectoryTaxonomyWriter.MemoryOrdinalMap, DirectoryTaxonomyWriter.OrdinalMapINDEX_EPOCH| Constructor and Description |
|---|
IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter(Directory d) |
IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter(Directory directory,
IndexWriterConfig.OpenMode openMode) |
IndexAndTaxonomyRevision.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, unlockpublic IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode, TaxonomyWriterCache cache) throws IOException
public IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode) throws IOException
public IndexAndTaxonomyRevision.SnapshotDirectoryTaxonomyWriter(Directory d) throws IOException
protected IndexWriterConfig createIndexWriterConfig(IndexWriterConfig.OpenMode openMode)
DirectoryTaxonomyWriterIndexWriterConfig 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 DirectoryTaxonomyWriteropenMode - see IndexWriterConfig.OpenModeDirectoryTaxonomyWriter.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 DirectoryTaxonomyWriterdirectory - the Directory on top of which an IndexWriter
should be opened.config - configuration for the internal index writer.IOExceptionDirectoryTaxonomyWriter.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.