mirror of https://github.com/apache/lucene.git
use short-circuit logic to save extra comparsion & method invocation in BlockTermsReader
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1144241 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
255ae3e9bf
commit
b1142c17b4
|
@ -34,7 +34,6 @@ import org.apache.lucene.index.SegmentInfo;
|
|||
import org.apache.lucene.index.TermState;
|
||||
import org.apache.lucene.index.Terms;
|
||||
import org.apache.lucene.index.TermsEnum;
|
||||
import org.apache.lucene.index.codecs.standard.StandardPostingsReader; // javadocs
|
||||
import org.apache.lucene.store.ByteArrayDataInput;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.store.IOContext;
|
||||
|
@ -828,12 +827,12 @@ public class BlockTermsReader extends FieldsProducer {
|
|||
postingsReader.readTermsBlock(in, fieldInfo, state);
|
||||
|
||||
blocksSinceSeek++;
|
||||
indexIsCurrent &= (blocksSinceSeek < indexReader.getDivisor());
|
||||
indexIsCurrent = indexIsCurrent && (blocksSinceSeek < indexReader.getDivisor());
|
||||
//System.out.println(" indexIsCurrent=" + indexIsCurrent);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private void decodeMetaData() throws IOException {
|
||||
//System.out.println("BTR.decodeMetadata mdUpto=" + metaDataUpto + " vs termCount=" + state.termCount + " state=" + state);
|
||||
if (!seekPending) {
|
||||
|
|
Loading…
Reference in New Issue