public override object Clone() { if (_input == null) { throw new AlreadyClosedException("this FieldsReader is closed"); } return(new SimpleTextStoredFieldsReader(_offsets, (IndexInput)_input.Clone(), _fieldInfos)); }
public override IntIndexInputReader Reader() { var buffer = new int[BLOCK_SIZE]; var clone = (IndexInput)_input.Clone(); // TODO: can this be simplified? return(new IntBlockIndexReader(clone, buffer, GetBlockReader(clone, buffer))); }
public SimpleTextFieldsReader(SegmentReadState state) { _maxDoc = state.SegmentInfo.DocCount; _fieldInfos = state.FieldInfos; _input = state.Directory.OpenInput( SimpleTextPostingsFormat.GetPostingsFileName(state.SegmentInfo.Name, state.SegmentSuffix), state.Context); bool success = false; try { _fields = ReadFields((IndexInput)_input.Clone()); success = true; } finally { if (!success) { IOUtils.CloseWhileHandlingException(); } } }
public SimpleTextDocsEnum(SimpleTextFieldsReader outerInstance) { _inStart = outerInstance._input; _in = (IndexInput) _inStart.Clone(); }
public SimpleTextDocsAndPositionsEnum(SimpleTextFieldsReader outerInstance) { _inStart = outerInstance._input; _in = (IndexInput)_inStart.Clone(); }