public class Versions
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Versions.DocIdAndVersion
Wraps an
LeafReaderContext , a doc ID relative to the context doc base and a version. |
Modifier and Type | Field and Description |
---|---|
static long |
MATCH_ANY
used to indicate the write operation should succeed regardless of current version
|
static long |
MATCH_DELETED
used to indicate that the write operation should be executed if the document is currently deleted
i.e., not found in the index and/or found as deleted (with version) in the version map
|
static long |
NOT_FOUND
indicates that the current document was not found in lucene and in the version map
|
static long |
NOT_SET
used when the document is old and doesn't contain any version information in the index
see
PerThreadIDAndVersionLookup.lookup(org.apache.lucene.util.BytesRef, org.apache.lucene.util.Bits, org.apache.lucene.index.LeafReaderContext) |
Modifier and Type | Method and Description |
---|---|
static Versions.DocIdAndVersion |
loadDocIdAndVersion(org.apache.lucene.index.IndexReader reader,
org.apache.lucene.index.Term term)
Load the internal doc ID and version for the uid from the reader, returning
null if the uid wasn't found,
a doc ID and a version otherwise, the version being potentially set to
NOT_SET if the uid has no associated version
|
static long |
loadVersion(org.apache.lucene.index.IndexReader reader,
org.apache.lucene.index.Term term)
|
public static final long MATCH_ANY
public static final long NOT_FOUND
public static final long NOT_SET
PerThreadIDAndVersionLookup.lookup(org.apache.lucene.util.BytesRef, org.apache.lucene.util.Bits, org.apache.lucene.index.LeafReaderContext)
public static final long MATCH_DELETED
public static Versions.DocIdAndVersion loadDocIdAndVersion(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term) throws java.io.IOException
NOT_SET
if the uid has no associated version
java.io.IOException
public static long loadVersion(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term) throws java.io.IOException
java.io.IOException