Projects >> lucene-solr >>8205c3f4a3d41a0d94378e08d7075116edcca8a0

Chunk
Conflicting content
    ensureOpen();
  }

  @Override
<<<<<<< HEAD
  public String toString() {
    return "SlowMultiReaderWrapper(" + in + ")";
=======
  public synchronized byte[] norms(String field) throws IOException {
    byte[] bytes = normsCache.get(field);
    if (bytes != null)
      return bytes;
    if (!hasNorms(field))
      return null;

    bytes = MultiNorms.norms(in, field);
    normsCache.put(field, bytes);
    return bytes;
  }

  @Override
  public synchronized void norms(String field, byte[] bytes, int offset) throws IOException {
    // TODO: maybe optimize
    ensureOpen();
    byte[] norms = norms(field);
    if (norms == null) {
      Arrays.fill(bytes, offset, bytes.length, Similarity.getDefault().encodeNormValue(1.0f));
    } else {
      System.arraycopy(norms, 0, bytes, offset, maxDoc());
    }
  }
  
  @Override
  public ReaderContext getTopReaderContext() {
    return readerContext;
  }
  
  @Override
  protected void doSetNorm(int n, String field, byte value)
      throws CorruptIndexException, IOException {
    synchronized(normsCache) {
      normsCache.remove(field);
    }
    in.doSetNorm(n, field, value);
>>>>>>> 6c9656b49b32f5d5c57c58a9b5b06725c7b244d6
  }
}
Solution content
  }

  @Override
  public String toString() {
    return "SlowMultiReaderWrapper(" + in + ")";
  }

  @Override
  public synchronized byte[] norms(String field) throws IOException {
    ensureOpen();
    byte[] bytes = normsCache.get(field);
    if (bytes != null)
      return bytes;
    if (!hasNorms(field))
      return null;

    bytes = MultiNorms.norms(in, field);
    normsCache.put(field, bytes);
    return bytes;
  }

  @Override
  public synchronized void norms(String field, byte[] bytes, int offset) throws IOException {
    // TODO: maybe optimize
    ensureOpen();
    byte[] norms = norms(field);
    if (norms == null) {
      Arrays.fill(bytes, offset, bytes.length, Similarity.getDefault().encodeNormValue(1.0f));
    } else {
      System.arraycopy(norms, 0, bytes, offset, maxDoc());
    }
  }
  
  @Override
  public ReaderContext getTopReaderContext() {
    return readerContext;
  }
  
  @Override
  protected void doSetNorm(int n, String field, byte value)
      throws CorruptIndexException, IOException {
    synchronized(normsCache) {
      normsCache.remove(field);
    }
    in.doSetNorm(n, field, value);
  }
}
File
SlowMultiReaderWrapper.java
Developer's decision
Concatenation
Kind of conflict
Annotation
Method declaration
Method invocation
Method signature
Return statement
Synchronized statement
Chunk
Conflicting content
        while (next() != null) {
          final int cmp = termComp.compare(bytesReader.term, term);
          if (cmp == 0) {
<<<<<<< HEAD
            if (doSeek && useCache) {
=======
            // Done!
            if (useCache) {
>>>>>>> 6c9656b49b32f5d5c57c58a9b5b06725c7b244d6
              // Store in cache
              FieldAndTerm entryKey = new FieldAndTerm(fieldTerm);
              cachedState = (TermState) state.clone();
Solution content
        while (next() != null) {
          final int cmp = termComp.compare(bytesReader.term, term);
          if (cmp == 0) {

            // Done!
            if (useCache) {
              // Store in cache
              FieldAndTerm entryKey = new FieldAndTerm(fieldTerm);
              cachedState = (TermState) state.clone();
File
PrefixCodedTermsReader.java
Developer's decision
Version 2
Kind of conflict
Comment
If statement
Chunk
Conflicting content
              cachedState.filePointer = in.getFilePointer();
              termsCache.put(entryKey, cachedState);
            }
<<<<<<< HEAD
=======

>>>>>>> 6c9656b49b32f5d5c57c58a9b5b06725c7b244d6
            return SeekStatus.FOUND;
          } else if (cmp > 0) {
            return SeekStatus.NOT_FOUND;
Solution content
              cachedState.filePointer = in.getFilePointer();
              termsCache.put(entryKey, cachedState);
            }

            return SeekStatus.FOUND;
          } else if (cmp > 0) {
            return SeekStatus.NOT_FOUND;
File
PrefixCodedTermsReader.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
        pendingPayloadBytes += payloadLength;
      }

<<<<<<< HEAD
      final int code = nextPosInt();

=======
      final int code = posReader.next();
      assert code >= 0;
>>>>>>> 6c9656b49b32f5d5c57c58a9b5b06725c7b244d6
      if (storePayloads) {
        if ((code & 1) != 0) {
          // Payload length has changed
Solution content
        pendingPayloadBytes += payloadLength;
      }

      final int code = nextPosInt();

      assert code >= 0;
      if (storePayloads) {
        if ((code & 1) != 0) {
          // Payload length has changed
File
SepPostingsReaderImpl.java
Developer's decision
Combination
Kind of conflict
Assert statement
Method invocation
Variable
Chunk
Conflicting content
import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
<<<<<<< HEAD
import org.apache.lucene.index.BulkPostingsEnum;
import org.apache.lucene.index.MultiFields;
=======
import org.apache.lucene.index.DocsEnum;
>>>>>>> 6c9656b49b32f5d5c57c58a9b5b06725c7b244d6
import org.apache.lucene.util.OpenBitSet;
import org.apache.lucene.util.Bits;
Solution content
import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.index.BulkPostingsEnum;
import org.apache.lucene.util.OpenBitSet;
import org.apache.lucene.util.Bits;
File
MultiTermQueryWrapperFilter.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
      // fill into a OpenBitSet
      final OpenBitSet bitSet = new OpenBitSet(context.reader.maxDoc());
      int termCount = 0;
<<<<<<< HEAD
      final Bits delDocs = MultiFields.getDeletedDocs(reader);
      BulkPostingsEnum postingsEnum = null;
=======
      final Bits delDocs = reader.getDeletedDocs();
      DocsEnum docsEnum = null;
>>>>>>> 6c9656b49b32f5d5c57c58a9b5b06725c7b244d6
      do {
        termCount++;
        postingsEnum = termsEnum.bulkPostings(postingsEnum, false, false);
Solution content
      // fill into a OpenBitSet
      final OpenBitSet bitSet = new OpenBitSet(context.reader.maxDoc());
      int termCount = 0;
      final Bits delDocs = reader.getDeletedDocs();
      BulkPostingsEnum postingsEnum = null;
      do {
        termCount++;
        postingsEnum = termsEnum.bulkPostings(postingsEnum, false, false);
File
MultiTermQueryWrapperFilter.java
Developer's decision
Combination
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
import java.util.Set;

import org.apache.lucene.index.DocsEnum;
<<<<<<< HEAD
import org.apache.lucene.index.BulkPostingsEnum;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.BulkPostingsEnum.BlockReader;
=======
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.index.IndexReader.ReaderContext;
import org.apache.lucene.index.Term;
>>>>>>> 6c9656b49b32f5d5c57c58a9b5b06725c7b244d6
import org.apache.lucene.search.Explanation.IDFExplanation;
import org.apache.lucene.util.ToStringUtils;
Solution content
import java.util.Set;

import org.apache.lucene.index.DocsEnum;
import org.apache.lucene.index.BulkPostingsEnum;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexReader.AtomicReaderContext;
import org.apache.lucene.index.IndexReader.ReaderContext;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.BulkPostingsEnum.BlockReader;
import org.apache.lucene.search.Explanation.IDFExplanation;
import org.apache.lucene.util.ToStringUtils;
File
TermQuery.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
    }

    @Override
<<<<<<< HEAD
    public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) throws IOException {
      assert reader.getSequentialSubReaders() == null;
      BulkPostingsEnum docs = reader.bulkTermPostingsEnum(term.field(),
                                                          term.bytes(),
                                                          true,
                                                          false);
=======
    public Scorer scorer(AtomicReaderContext context, boolean scoreDocsInOrder, boolean topScorer) throws IOException {
      assert assertTopReaderContext(context);
      final IndexReader reader = context.reader;
      DocsEnum docs = reader.termDocsEnum(reader.getDeletedDocs(),
                                          term.field(),
                                          term.bytes());

>>>>>>> 6c9656b49b32f5d5c57c58a9b5b06725c7b244d6
      if (docs == null) {
        return null;
      }
Solution content
    }

    @Override
    public Scorer scorer(AtomicReaderContext context, boolean scoreDocsInOrder, boolean topScorer) throws IOException {
      assert assertTopReaderContext(context);
      final IndexReader reader = context.reader;
      assert reader.getSequentialSubReaders() == null;
      BulkPostingsEnum docs = reader.bulkTermPostingsEnum(term.field(),
                                                          term.bytes(),
                                                          true,
                                                          false);
      if (docs == null) {
        return null;
      }
File
TermQuery.java
Developer's decision
Combination
Kind of conflict
Assert statement
Method invocation
Method signature
Variable