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
|
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
|
static long |
loadVersion(org.apache.lucene.index.IndexReader reader,
org.apache.lucene.index.Term term)
Load the version for the uid from the reader, returning
NOT_FOUND if no matching doc exists,
the version associated with the provided uid otherwise
|
public static final long MATCH_ANY
public static final long NOT_FOUND
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
java.io.IOException
public static long loadVersion(org.apache.lucene.index.IndexReader reader, org.apache.lucene.index.Term term) throws java.io.IOException
NOT_FOUND
if no matching doc exists,
java.io.IOException