public class

ReaderUtil

extends Object
java.lang.Object
   ↳ org.apache.lucene.util.ReaderUtil

Class Overview

Common util methods for dealing with IndexReaders.

Summary

Public Constructors
ReaderUtil()
Public Methods
static void gatherSubReaders(List<IndexReader> allSubReaders, IndexReader reader)
Gathers sub-readers from reader into a List.
static int subIndex(int n, int[] docStarts)
Returns index of the searcher/reader for document n in the array used to construct this searcher/reader.
static IndexReader subReader(int doc, IndexReader reader)
Returns sub IndexReader that contains the given document id.
static IndexReader subReader(IndexReader reader, int subIndex)
Returns sub-reader subIndex from reader.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ReaderUtil ()

Public Methods

public static void gatherSubReaders (List<IndexReader> allSubReaders, IndexReader reader)

Gathers sub-readers from reader into a List.

public static int subIndex (int n, int[] docStarts)

Returns index of the searcher/reader for document n in the array used to construct this searcher/reader.

public static IndexReader subReader (int doc, IndexReader reader)

Returns sub IndexReader that contains the given document id.

Parameters
doc id of document
reader parent reader
Returns
  • sub reader of parent which contains the specified doc id

public static IndexReader subReader (IndexReader reader, int subIndex)

Returns sub-reader subIndex from reader.

Parameters
reader parent reader
subIndex index of desired sub reader
Returns
  • the subreader at subIndex