org.elasticsearch.common.lucene.uid
Class UidField

java.lang.Object
  extended by org.apache.lucene.document.AbstractField
      extended by org.elasticsearch.common.lucene.uid.UidField
All Implemented Interfaces:
Serializable, org.apache.lucene.document.Fieldable

public class UidField
extends org.apache.lucene.document.AbstractField

See Also:
Serialized Form

Nested Class Summary
static class UidField.DocIdAndVersion
           
static class UidField.UidPayloadTokenStream
           
 
Field Summary
 
Fields inherited from class org.apache.lucene.document.AbstractField
binaryLength, binaryOffset, boost, fieldsData, indexOptions, isBinary, isIndexed, isStored, isTokenized, lazy, name, omitNorms, storeOffsetWithTermVector, storePositionWithTermVector, storeTermVector
 
Constructor Summary
UidField(String name, String uid, long version)
           
 
Method Summary
static UidField.DocIdAndVersion loadDocIdAndVersion(org.apache.lucene.index.IndexReader subReader, int docStart, org.apache.lucene.index.Term term)
           
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 -1 if no doc exists, or -2 if no version is available (for backward comp.)
 Reader readerValue()
           
 void setIndexOptions(org.apache.lucene.index.FieldInfo.IndexOptions indexOptions)
           
 void setOmitTermFreqAndPositions(boolean omitTermFreqAndPositions)
           
 void setUid(String uid)
           
 String stringValue()
           
 org.apache.lucene.analysis.TokenStream tokenStreamValue()
           
 String uid()
           
 long version()
           
 void version(long version)
           
 
Methods inherited from class org.apache.lucene.document.AbstractField
getBinaryLength, getBinaryOffset, getBinaryValue, getBinaryValue, getBoost, getIndexOptions, getOmitNorms, getOmitTermFreqAndPositions, isBinary, isIndexed, isLazy, isStored, isStoreOffsetWithTermVector, isStorePositionWithTermVector, isTermVectorStored, isTokenized, name, setBoost, setOmitNorms, setStoreTermVector, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UidField

public UidField(String name,
                String uid,
                long version)
Method Detail

loadDocIdAndVersion

public static UidField.DocIdAndVersion loadDocIdAndVersion(org.apache.lucene.index.IndexReader subReader,
                                                           int docStart,
                                                           org.apache.lucene.index.Term term)

loadVersion

public 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 -1 if no doc exists, or -2 if no version is available (for backward comp.)


setIndexOptions

public void setIndexOptions(org.apache.lucene.index.FieldInfo.IndexOptions indexOptions)
Specified by:
setIndexOptions in interface org.apache.lucene.document.Fieldable
Overrides:
setIndexOptions in class org.apache.lucene.document.AbstractField

setOmitTermFreqAndPositions

public void setOmitTermFreqAndPositions(boolean omitTermFreqAndPositions)
Overrides:
setOmitTermFreqAndPositions in class org.apache.lucene.document.AbstractField

uid

public String uid()

setUid

public void setUid(String uid)

stringValue

public String stringValue()

readerValue

public Reader readerValue()

version

public long version()

version

public void version(long version)

tokenStreamValue

public org.apache.lucene.analysis.TokenStream tokenStreamValue()


Copyright © 2009-2012. All Rights Reserved.