@Override public void checkIntegrity() throws IOException { // term dictionary CodecUtil.checksumEntireFile(termsIn); // postings postingsReader.checkIntegrity(); }
longs[i] = bytesReader.readVLong(); ite.fr.parent.postingsReader.decodeTerm(longs, bytesReader, ite.fr.fieldInfo, termState, absolute);
public IntersectTermsEnumFrame(IntersectTermsEnum ite, int ord) throws IOException { this.ite = ite; this.ord = ord; this.termState = ite.fr.parent.postingsReader.newTermState(); this.termState.totalTermFreq = -1; this.longs = new long[ite.fr.longsSize]; }
@Override public PostingsEnum postings(PostingsEnum reuse, int flags) throws IOException { currentFrame.decodeMetaData(); return fr.parent.postingsReader.postings(fr.fieldInfo, currentFrame.termState, reuse, flags); }
@Override public long ramBytesUsed() { long sizeInBytes = postingsReader.ramBytesUsed(); for(FieldReader reader : fields.values()) { sizeInBytes += reader.ramBytesUsed(); } return sizeInBytes; }
postingsReader.init(termsIn, state);
@Override public final FieldsProducer fieldsProducer(SegmentReadState state) throws IOException { PostingsReaderBase postings = new Lucene40PostingsReader(state.directory, state.fieldInfos, state.segmentInfo, state.context, state.segmentSuffix); boolean success = false; try { FieldsProducer ret = new Lucene40BlockTreeTermsReader(postings, state); success = true; return ret; } finally { if (!success) { postings.close(); } } }
@Override public PostingsEnum postings(PostingsEnum reuse, int flags) throws IOException { assert !eof; //if (DEBUG) { //System.out.println("BTTR.docs seg=" + segment); //} currentFrame.decodeMetaData(); //if (DEBUG) { //System.out.println(" state=" + currentFrame.state); //} return fr.parent.postingsReader.postings(fr.fieldInfo, currentFrame.state, reuse, flags); }
@Override public long ramBytesUsed() { long ramBytesUsed = postingsReader.ramBytesUsed(); for (TermsReader r : fields.values()) { ramBytesUsed += r.ramBytesUsed(); } return ramBytesUsed; }
state.segmentInfo.getId(), state.segmentSuffix); CodecUtil.checksumEntireFile(in); this.postingsReader.init(in, state); seekDir(in);
@Override public void close() throws IOException { try { try { if (indexReader != null) { indexReader.close(); } } finally { // null so if an app hangs on to us (ie, we are not // GCable, despite being closed) we still free most // ram indexReader = null; if (in != null) { in.close(); } } } finally { if (postingsReader != null) { postingsReader.close(); } } }
longs[i] = bytesReader.readVLong(); ste.fr.parent.postingsReader.decodeTerm(longs, bytesReader, ste.fr.fieldInfo, state, absolute);
public SegmentTermsEnumFrame(SegmentTermsEnum ste, int ord) throws IOException { this.ste = ste; this.ord = ord; this.state = ste.fr.parent.postingsReader.newTermState(); this.state.totalTermFreq = -1; this.longs = new long[ste.fr.longsSize]; }
@Override public PostingsEnum postings(PostingsEnum reuse, int flags) throws IOException { currentFrame.decodeMetaData(); return fr.parent.postingsReader.postings(fr.fieldInfo, currentFrame.termState, reuse, flags); }
@Override public long ramBytesUsed() { long sizeInBytes = postingsReader.ramBytesUsed(); for(FieldReader reader : fields.values()) { sizeInBytes += reader.ramBytesUsed(); } return sizeInBytes; }
@Override public void checkIntegrity() throws IOException { postingsReader.checkIntegrity(); } }
postingsReader.init(in, state);
@Override public FieldsProducer fieldsProducer(final SegmentReadState state) throws IOException { final PostingsReaderBase postings = new Siren10PostingsReader(state.dir, state.segmentInfo, state.context, state.segmentSuffix, this.getFactory()); boolean success = false; try { final FieldsProducer ret = new BlockTreeTermsReader(state.dir, state.fieldInfos, state.segmentInfo, postings, state.context, state.segmentSuffix, state.termsIndexDivisor); success = true; return ret; } finally { if (!success) { postings.close(); } } }
@Override void decodeMetaData() throws IOException { if (!decoded && !seekPending) { if (meta.bytes != null) { bytesReader.reset(meta.bytes, 0, meta.bytes.length); } postingsReader.decodeTerm(meta.longs, bytesReader, fieldInfo, state, true); decoded = true; } }
public IDVersionSegmentTermsEnumFrame(IDVersionSegmentTermsEnum ste, int ord) throws IOException { this.ste = ste; this.ord = ord; this.state = ste.fr.parent.postingsReader.newTermState(); this.state.totalTermFreq = -1; this.longs = new long[ste.fr.longsSize]; }