Examples of Lucene41PostingsReader


Examples of org.apache.lucene.codecs.lucene41.Lucene41PostingsReader

    }
  }

  @Override
  public FieldsProducer fieldsProducer(SegmentReadState state) throws IOException {
    PostingsReaderBase postings = new Lucene41PostingsReader(state.directory, state.fieldInfos, state.segmentInfo, state.context, state.segmentSuffix);
    TermsIndexReaderBase indexReader;

    boolean success = false;
    try {
      indexReader = new FixedGapTermsIndexReader(state.directory,
                                                 state.fieldInfos,
                                                 state.segmentInfo.name,
                                                 state.termsIndexDivisor,
                                                 BytesRef.getUTF8SortedAsUnicodeComparator(),
                                                 state.segmentSuffix, state.context);
      success = true;
    } finally {
      if (!success) {
        postings.close();
      }
    }

    success = false;
    try {
      FieldsProducer ret = new BlockTermsReader(indexReader,
                                                state.directory,
                                                state.fieldInfos,
                                                state.segmentInfo,
                                                postings,
                                                state.context,
                                                state.segmentSuffix);
      success = true;
      return ret;
    } finally {
      if (!success) {
        try {
          postings.close();
        } finally {
          indexReader.close();
        }
      }
    }
View Full Code Here

Examples of org.apache.lucene.codecs.lucene41.Lucene41PostingsReader

    PostingsReaderBase docsReader = null;
    PostingsReaderBase pulsingReaderInner = null;
    PostingsReaderBase pulsingReader = null;
    boolean success = false;
    try {
      docsReader = new Lucene41PostingsReader(state.directory, state.fieldInfos, state.segmentInfo, state.context, state.segmentSuffix);
      pulsingReaderInner = new PulsingPostingsReader(state, docsReader);
      pulsingReader = new PulsingPostingsReader(state, pulsingReaderInner);
      FieldsProducer ret = new BlockTreeTermsReader(
                                                    state.directory, state.fieldInfos, state.segmentInfo,
                                                    pulsingReader,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.