Method GetOnlySegmentReader
GetOnlySegmentReader(Directory)
Lotsa tests did hacks like:
SegmentReader reader = (SegmentReader) IndexReader.open(dir);
They broke. This method serves as a hack to keep hacks working
We do it with R/W access for the tests (BW compatibility)
Declaration
public static SegmentReader GetOnlySegmentReader(Directory dir)
Parameters
Type | Name | Description |
---|---|---|
Directory | dir |
Returns
Type | Description |
---|---|
SegmentReader |
GetOnlySegmentReader(IndexReader)
Declaration
public static SegmentReader GetOnlySegmentReader(IndexReader reader)
Parameters
Type | Name | Description |
---|---|---|
IndexReader | reader |
Returns
Type | Description |
---|---|
SegmentReader |