Class DocumentBatch

java.lang.Object
org.apache.lucene.monitor.DocumentBatch
All Implemented Interfaces:
Closeable, AutoCloseable, Supplier<LeafReader>
Direct Known Subclasses:
DocumentBatch.MultiDocumentBatch, DocumentBatch.SingletonDocumentBatch

abstract class DocumentBatch extends Object implements Closeable, Supplier<LeafReader>
  • Constructor Details

    • DocumentBatch

      DocumentBatch()
  • Method Details

    • of

      public static DocumentBatch of(Analyzer analyzer, Document doc)
      Create a DocumentBatch containing a single InputDocument
      Parameters:
      doc - the document to add
      Returns:
      the batch containing the input document
    • of

      public static DocumentBatch of(Analyzer analyzer, Document... docs)
      Create a DocumentBatch containing a set of InputDocuments
      Parameters:
      docs - Collection of documents to add. There must be at least one document in the collection.
      Returns:
      the batch containing the input documents