Class InstrumentedIndexWriter

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.apache.lucene.index.TwoPhaseCommit

    public class InstrumentedIndexWriter
    extends org.apache.lucene.index.IndexWriter
    Since:
    8.0
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.lucene.index.IndexWriter

        org.apache.lucene.index.IndexWriter.IndexReaderWarmer
    • Field Summary

      • Fields inherited from class org.apache.lucene.index.IndexWriter

        MAX_TERM_LENGTH, SOURCE, SOURCE_ADDINDEXES_READERS, SOURCE_FLUSH, SOURCE_MERGE, WRITE_LOCK_NAME
    • 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 class org.apache.lucene.index.IndexWriter
        Throws:
        IOException
      • tryDeleteDocument

        public boolean tryDeleteDocument​(org.apache.lucene.index.IndexReader readerIn,
                                         int docID)
                                  throws IOException
        Overrides:
        tryDeleteDocument in class org.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 class org.apache.lucene.index.IndexWriter
        Throws:
        IOException
      • deleteDocuments

        public void deleteDocuments​(org.apache.lucene.index.Term... terms)
                             throws IOException
        Overrides:
        deleteDocuments in class org.apache.lucene.index.IndexWriter
        Throws:
        IOException
      • deleteDocuments

        public void deleteDocuments​(org.apache.lucene.search.Query query)
                             throws IOException
        Overrides:
        deleteDocuments in class org.apache.lucene.index.IndexWriter
        Throws:
        IOException
      • deleteDocuments

        public void deleteDocuments​(org.apache.lucene.search.Query... queries)
                             throws IOException
        Overrides:
        deleteDocuments in class org.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 class org.apache.lucene.index.IndexWriter
        Throws:
        IOException
      • forceMerge

        public void forceMerge​(int maxNumSegments,
                               boolean doWait)
                        throws IOException
        Overrides:
        forceMerge in class org.apache.lucene.index.IndexWriter
        Throws:
        IOException
      • forceMergeDeletes

        public void forceMergeDeletes​(boolean doWait)
                               throws IOException
        Overrides:
        forceMergeDeletes in class org.apache.lucene.index.IndexWriter
        Throws:
        IOException
      • deleteAll

        public void deleteAll()
                       throws IOException
        Overrides:
        deleteAll in class org.apache.lucene.index.IndexWriter
        Throws:
        IOException
      • merge

        public void merge​(org.apache.lucene.index.MergePolicy.OneMerge merge)
                   throws IOException
        Overrides:
        merge in class org.apache.lucene.index.IndexWriter
        Throws:
        IOException