示例#1
0
        public override FieldsProducer FieldsProducer(SegmentReadState state)
        {
            using (var postings = new Lucene40PostingsReader(state.Directory, state.FieldInfos,
                                                             state.SegmentInfo,
                                                             state.Context, state.SegmentSuffix))
            {
                var ret = new AppendingTermsReader(
                    state.Directory,
                    state.FieldInfos,
                    state.SegmentInfo,
                    postings,
                    state.Context,
                    state.SegmentSuffix,
                    state.TermsIndexDivisor);

                return(ret);
            }
        }
        public override FieldsProducer FieldsProducer(SegmentReadState state)
        {
            using (var postings = new Lucene40PostingsReader(state.Directory, state.FieldInfos,
                state.SegmentInfo,
                state.Context, state.SegmentSuffix))
            {
                var ret = new AppendingTermsReader(
                    state.Directory,
                    state.FieldInfos,
                    state.SegmentInfo,
                    postings,
                    state.Context,
                    state.SegmentSuffix,
                    state.TermsIndexDivisor);

                return ret;
            }
        }
示例#3
0
        public override FieldsProducer FieldsProducer(SegmentReadState state)
        {
#pragma warning disable 612, 618
            using var postings = new Lucene40PostingsReader(state.Directory, state.FieldInfos,
                                                            state.SegmentInfo,
                                                            state.Context, state.SegmentSuffix);
            var ret = new AppendingTermsReader(
                state.Directory,
                state.FieldInfos,
                state.SegmentInfo,
                postings,
                state.Context,
                state.SegmentSuffix,
                state.TermsIndexDivisor);

            return(ret);

#pragma warning restore 612, 618
        }
        public override FieldsProducer FieldsProducer(SegmentReadState state)
        {
            PostingsReaderBase postings = new Lucene40PostingsReader(state.Directory, state.FieldInfos,
                state.SegmentInfo,
                state.Context, state.SegmentSuffix);

            var success = false;
            FieldsProducer ret;
            using (ret = new AppendingTermsReader(
                state.Directory,
                state.FieldInfos,
                state.SegmentInfo,
                postings,
                state.Context,
                state.SegmentSuffix,
                state.TermsIndexDivisor))
            {
                success = true;
            }

            return ret;
            
        }