PKIndexSplitter (Lucene 10.5.0 misc API)
Description: declaration: package: org.apache.lucene.misc.index, class: PKIndexSplitter

Package org.apache.lucene.misc.index

# Class PKIndexSplitter

java.lang.Object
org.apache.lucene.misc.index.PKIndexSplitter

public class PKIndexSplitter extends Object
Split an index based on a `Query`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Term midTerm)`
  Split an index based on a given primary key term and a 'middle' term.
  `PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Term midTerm, IndexWriterConfig config1, IndexWriterConfig config2)`
  `PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Query docsInFirstIndex)`
  Split an index based on a `Query`.
  `PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Query docsInFirstIndex, IndexWriterConfig config1, IndexWriterConfig config2)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `split()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PKIndexSplitter

    public PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Query docsInFirstIndex)
    Split an index based on a `Query`. All documents that match the query are sent to dir1, remaining ones to dir2.

  - ### PKIndexSplitter

    public PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Query docsInFirstIndex, IndexWriterConfig config1, IndexWriterConfig config2)

  - ### PKIndexSplitter

    public PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Term midTerm)
    Split an index based on a given primary key term and a 'middle' term. If the middle term is present, it's sent to dir2.

  - ### PKIndexSplitter

    public PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Term midTerm, IndexWriterConfig config1, IndexWriterConfig config2)

- ## Method Details

  - ### split

    public void split() throws IOException
    Throws:
      `IOException`