Class InstrumentedIndexWriter
- java.lang.Object
-
- org.apache.lucene.index.IndexWriter
-
- com.atlassian.confluence.internal.search.v2.lucene.InstrumentedIndexWriter
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.lucene.index.TwoPhaseCommit
public class InstrumentedIndexWriter extends org.apache.lucene.index.IndexWriter
- Since:
- 8.0
-
-
Constructor Summary
Constructors Constructor Description InstrumentedIndexWriter(org.apache.lucene.store.Directory d, org.apache.lucene.index.IndexWriterConfig conf, LuceneIndexMetrics metrics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteAll()
void
deleteDocuments(org.apache.lucene.index.Term term)
void
deleteDocuments(org.apache.lucene.index.Term... terms)
void
deleteDocuments(org.apache.lucene.search.Query query)
void
deleteDocuments(org.apache.lucene.search.Query... queries)
void
forceMerge(int maxNumSegments, boolean doWait)
void
forceMergeDeletes(boolean doWait)
void
merge(org.apache.lucene.index.MergePolicy.OneMerge merge)
boolean
tryDeleteDocument(org.apache.lucene.index.IndexReader readerIn, int docID)
void
updateDocument(org.apache.lucene.index.Term term, Iterable<? extends org.apache.lucene.index.IndexableField> doc, org.apache.lucene.analysis.Analyzer analyzer)
void
updateDocuments(org.apache.lucene.index.Term delTerm, Iterable<? extends Iterable<? extends org.apache.lucene.index.IndexableField>> docs, org.apache.lucene.analysis.Analyzer analyzer)
-
Methods inherited from class org.apache.lucene.index.IndexWriter
addDocument, addDocument, addDocuments, addDocuments, addIndexes, addIndexes, close, close, commit, deleteUnusedFiles, doAfterFlush, doBeforeFlush, ensureOpen, ensureOpen, flush, forceMerge, forceMergeDeletes, getAnalyzer, getCommitData, getConfig, getDirectory, getMergingSegments, getNextMerge, hasDeletions, hasPendingMerges, hasUncommittedChanges, isLocked, maxDoc, maybeMerge, numDeletedDocs, numDocs, numRamDocs, prepareCommit, ramSizeInBytes, rollback, segString, segString, segString, setCommitData, unlock, updateDocument, updateDocuments, waitForMerges
-
-
-
-
Constructor Detail
-
InstrumentedIndexWriter
public InstrumentedIndexWriter(@Nonnull org.apache.lucene.store.Directory d, @Nonnull org.apache.lucene.index.IndexWriterConfig conf, @Nonnull LuceneIndexMetrics metrics) throws IOException
- Throws:
IOException
-
-
Method Detail
-
deleteDocuments
public void deleteDocuments(org.apache.lucene.index.Term term) throws IOException
- Overrides:
deleteDocuments
in classorg.apache.lucene.index.IndexWriter
- Throws:
IOException
-
tryDeleteDocument
public boolean tryDeleteDocument(org.apache.lucene.index.IndexReader readerIn, int docID) throws IOException
- Overrides:
tryDeleteDocument
in classorg.apache.lucene.index.IndexWriter
- Throws:
IOException
-
updateDocuments
public void updateDocuments(org.apache.lucene.index.Term delTerm, Iterable<? extends Iterable<? extends org.apache.lucene.index.IndexableField>> docs, org.apache.lucene.analysis.Analyzer analyzer) throws IOException
- Overrides:
updateDocuments
in classorg.apache.lucene.index.IndexWriter
- Throws:
IOException
-
deleteDocuments
public void deleteDocuments(org.apache.lucene.index.Term... terms) throws IOException
- Overrides:
deleteDocuments
in classorg.apache.lucene.index.IndexWriter
- Throws:
IOException
-
deleteDocuments
public void deleteDocuments(org.apache.lucene.search.Query query) throws IOException
- Overrides:
deleteDocuments
in classorg.apache.lucene.index.IndexWriter
- Throws:
IOException
-
deleteDocuments
public void deleteDocuments(org.apache.lucene.search.Query... queries) throws IOException
- Overrides:
deleteDocuments
in classorg.apache.lucene.index.IndexWriter
- Throws:
IOException
-
updateDocument
public void updateDocument(org.apache.lucene.index.Term term, Iterable<? extends org.apache.lucene.index.IndexableField> doc, org.apache.lucene.analysis.Analyzer analyzer) throws IOException
- Overrides:
updateDocument
in classorg.apache.lucene.index.IndexWriter
- Throws:
IOException
-
forceMerge
public void forceMerge(int maxNumSegments, boolean doWait) throws IOException
- Overrides:
forceMerge
in classorg.apache.lucene.index.IndexWriter
- Throws:
IOException
-
forceMergeDeletes
public void forceMergeDeletes(boolean doWait) throws IOException
- Overrides:
forceMergeDeletes
in classorg.apache.lucene.index.IndexWriter
- Throws:
IOException
-
deleteAll
public void deleteAll() throws IOException
- Overrides:
deleteAll
in classorg.apache.lucene.index.IndexWriter
- Throws:
IOException
-
merge
public void merge(org.apache.lucene.index.MergePolicy.OneMerge merge) throws IOException
- Overrides:
merge
in classorg.apache.lucene.index.IndexWriter
- Throws:
IOException
-
-