Class ReaderUtil
Common util methods for dealing with IndexReaders and IndexReaderContexts.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Inheritance
System.Object
ReaderUtil
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Index
Assembly: Lucene.Net.dll
Syntax
public sealed class ReaderUtil
Methods
| Improve this Doc View SourceGetTopLevelContext(IndexReaderContext)
Walks up the reader tree and return the given context's top level reader context, or in other words the reader tree's root context.
Declaration
public static IndexReaderContext GetTopLevelContext(IndexReaderContext context)
Parameters
Type | Name | Description |
---|---|---|
IndexReaderContext | context |
Returns
Type | Description |
---|---|
IndexReaderContext |
SubIndex(Int32, IList<AtomicReaderContext>)
Returns index of the searcher/reader for document n
in the
array used to construct this searcher/reader.
Declaration
public static int SubIndex(int n, IList<AtomicReaderContext> leaves)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | n | |
System.Collections.Generic.IList<AtomicReaderContext> | leaves |
Returns
Type | Description |
---|---|
System.Int32 |
SubIndex(Int32, Int32[])
Returns index of the searcher/reader for document n
in the
array used to construct this searcher/reader.
Declaration
public static int SubIndex(int n, int[] docStarts)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | n | |
System.Int32[] | docStarts |
Returns
Type | Description |
---|---|
System.Int32 |