org.apache.lucene.index
Class MergeState.DocMap

java.lang.Object
  extended by org.apache.lucene.index.MergeState.DocMap
Enclosing class:
MergeState

public abstract static class MergeState.DocMap
extends Object

Remaps docids around deletes during merge


Constructor Summary
protected MergeState.DocMap(Bits liveDocs)
          Sole constructor.
 
Method Summary
static MergeState.DocMap build(AtomicReader reader)
          Creates a MergeState.DocMap instance appropriate for this reader.
 int get(int docId)
          Returns the mapped docID corresponding to the provided one.
 boolean hasDeletions()
          Returns true if there are any deletions.
abstract  int maxDoc()
          Returns the total number of documents, ignoring deletions.
abstract  int numDeletedDocs()
          Returns the number of deleted documents.
 int numDocs()
          Returns the number of not-deleted documents.
abstract  int remap(int docId)
          Returns the mapped docID corresponding to the provided one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeState.DocMap

protected MergeState.DocMap(Bits liveDocs)
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

build

public static MergeState.DocMap build(AtomicReader reader)
Creates a MergeState.DocMap instance appropriate for this reader.


get

public int get(int docId)
Returns the mapped docID corresponding to the provided one.


remap

public abstract int remap(int docId)
Returns the mapped docID corresponding to the provided one.


maxDoc

public abstract int maxDoc()
Returns the total number of documents, ignoring deletions.


numDocs

public final int numDocs()
Returns the number of not-deleted documents.


numDeletedDocs

public abstract int numDeletedDocs()
Returns the number of deleted documents.


hasDeletions

public boolean hasDeletions()
Returns true if there are any deletions.



Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.