# Uses of Class
org.apache.lucene.index.IndexWriter

Packages that use IndexWriter
Package
Description
org.apache.lucene.index
Code to maintain and access indices.
org.apache.lucene.internal.tests
Internal bridges to package-private internals, for use by the lucene test framework only.
org.apache.lucene.search
Code to search indices.

- ## Uses of IndexWriter in org.apache.lucene.index

  Methods in org.apache.lucene.index with parameters of type IndexWriter
  Modifier and Type
  Method
  Description
  `protected abstract DirectoryReader`
  DirectoryReader.`doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes)`
  Implement this method to support `DirectoryReader.openIfChanged(DirectoryReader,IndexWriter,boolean)`.
  `protected final DirectoryReader`
  FilterDirectoryReader.`doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes)`
  `protected DirectoryReader`
  StandardDirectoryReader.`doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes)`
  `static DirectoryReader`
  DirectoryReader.`open(IndexWriter writer)`
  Open a near real time IndexReader from the `IndexWriter`.
  `static DirectoryReader`
  DirectoryReader.`open(IndexWriter writer, boolean applyAllDeletes, boolean writeAllDeletes)`
  Expert: open a near real time IndexReader from the `IndexWriter`, controlling whether past deletions should be applied.
  `static DirectoryReader`
  DirectoryReader.`openIfChanged(DirectoryReader oldReader, IndexWriter writer)`
  Expert: If there changes (committed or not) in the `IndexWriter` versus what the provided reader is searching, then open and return a new IndexReader searching both committed and uncommitted changes from the writer; else, return null (though, the current implementation never returns null).
  `static DirectoryReader`
  DirectoryReader.`openIfChanged(DirectoryReader oldReader, IndexWriter writer, boolean applyAllDeletes)`
  Expert: Opens a new reader, if there are any changes, controlling whether past deletions should be applied.
  Constructors in org.apache.lucene.index with parameters of type IndexWriter
  Modifier
  Constructor
  Description
  ``
  `ReaderManager(IndexWriter writer)`
  Creates and returns a new ReaderManager from the given `IndexWriter`.
  ``
  `ReaderManager(IndexWriter writer, boolean applyAllDeletes, boolean writeAllDeletes)`
  Expert: creates and returns a new ReaderManager from the given `IndexWriter`, controlling whether past deletions should be applied.

- ## Uses of IndexWriter in org.apache.lucene.internal.tests

  Methods in org.apache.lucene.internal.tests with parameters of type IndexWriter
  Modifier and Type
  Method
  Description
  `int`
  IndexWriterAccess.`getDocWriterThreadPoolSize(IndexWriter iw)`
  `DirectoryReader`
  IndexWriterAccess.`getReader(IndexWriter iw, boolean applyDeletions, boolean writeAllDeletes)`
  `int`
  IndexWriterAccess.`getSegmentCount(IndexWriter iw)`
  `boolean`
  IndexWriterAccess.`isClosed(IndexWriter iw)`
  `boolean`
  IndexWriterAccess.`isDeleterClosed(IndexWriter iw)`
  `SegmentCommitInfo`
  IndexWriterAccess.`newestSegment(IndexWriter iw)`
  `String`
  IndexWriterAccess.`segString(IndexWriter iw)`

- ## Uses of IndexWriter in org.apache.lucene.search

  Constructors in org.apache.lucene.search with parameters of type IndexWriter
  Modifier
  Constructor
  Description
  ``
  `ControlledRealTimeReopenThread(IndexWriter writer, ReferenceManager<T> manager, double targetMaxStaleSec, double targetMinStaleSec)`
  Create ControlledRealTimeReopenThread, to periodically reopen the `ReferenceManager`.
  ``
  `SearcherManager(IndexWriter writer, boolean applyAllDeletes, boolean writeAllDeletes, SearcherFactory searcherFactory)`
  Expert: creates and returns a new SearcherManager from the given `IndexWriter`, controlling whether past deletions should be applied.
  ``
  `SearcherManager(IndexWriter writer, boolean applyAllDeletes, boolean writeAllDeletes, SearcherFactory searcherFactory, RefreshCommitSupplier refreshCommitSupplier)`
  Expert: creates and returns a new SearcherManager from the given `IndexWriter`, controlling whether past deletions should be applied.
  ``
  `SearcherManager(IndexWriter writer, SearcherFactory searcherFactory)`
  Creates and returns a new SearcherManager from the given `IndexWriter`.