コード例 #1
0
 public override object Clone()
 {
     if (_input == null)
     {
         throw new AlreadyClosedException("this FieldsReader is closed");
     }
     return(new SimpleTextStoredFieldsReader(_offsets, (IndexInput)_input.Clone(), _fieldInfos));
 }
コード例 #2
0
        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)));
        }
コード例 #3
0
 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();
         }
     }
 }
コード例 #4
0
        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();
                }
            }
        }
コード例 #5
0
 public SimpleTextDocsEnum(SimpleTextFieldsReader outerInstance)
 {
     _inStart = outerInstance._input;
     _in = (IndexInput) _inStart.Clone();
 }
コード例 #6
0
 public SimpleTextDocsAndPositionsEnum(SimpleTextFieldsReader outerInstance)
 {
     _inStart = outerInstance._input;
     _in      = (IndexInput)_inStart.Clone();
 }