Exemplo n.º 1
0
 public DocMapAnonymousInnerClassHelper(SortingOneMerge outerInstance, MergeState mergeState, MonotonicAppendingLongBuffer deletes)
 {
     this.outerInstance = outerInstance;
     this.mergeState = mergeState;
     this.deletes = deletes;
 }
Exemplo n.º 2
0
 internal virtual MonotonicAppendingLongBuffer getDeletes(IList<AtomicReader> readers)
 {
     MonotonicAppendingLongBuffer deletes = new MonotonicAppendingLongBuffer();
       int deleteCount = 0;
       foreach (AtomicReader reader in readers)
       {
     //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
     //ORIGINAL LINE: final int maxDoc = reader.maxDoc();
     int maxDoc = reader.maxDoc();
     //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
     //ORIGINAL LINE: final org.apache.lucene.util.Bits liveDocs = reader.getLiveDocs();
     Bits liveDocs = reader.LiveDocs;
     for (int i = 0; i < maxDoc; ++i)
     {
       if (liveDocs != null && !liveDocs.get(i))
       {
     ++deleteCount;
       }
       else
       {
     deletes.add(deleteCount);
       }
     }
       }
       deletes.freeze();
       return deletes;
 }