Package org.elasticsearch.index.mapper
Class Uid
org.elasticsearch.index.mapper.Uid
public final class Uid
extends
-
Field Summary
-
Constructor Summary
ConstructorDescriptiontype, id)
-
Method Summary
Modifier and TypeMethodDescriptionstatic
decodeId(byte[] idBytes)
Decode an indexed id back to its original form.static
decodeId(byte[] idBytes, int offset, int length)
Decode an indexed id back to its original form.static org.apache.lucene.util.BytesRef
id)
Encode an id for storage in the index.boolean
o)
int
hashCode()
id()
toString()
type()
Methods inherited from class java.lang.
, , , , , , ,
-
Field Details
-
DELIMITER
public static final char DELIMITER- See Also:
- Constant Field Values
-
DELIMITER_BYTE
public static final byte DELIMITER_BYTE- See Also:
- Constant Field Values
-
-
Constructor Details
-
Uid
public Uid( type, id)
-
-
Method Details
-
type
public type() -
id
public id() -
equals
public boolean equals( o)- Overrides:
in class
-
hashCode
public int hashCode()- Overrides:
in class
-
toString
public toString()- Overrides:
in class
-
encodeId
public static org.apache.lucene.util.BytesRef encodeId( id)Encode an id for storage in the index. This encoding is optimized for numeric and base64 ids, which are encoded in a much denser way than what UTF8 would do.- See Also:
decodeId(byte[])
-
decodeId
public static decodeId(byte[] idBytes)Decode an indexed id back to its original form.- See Also:
encodeId(java.lang.String)
-
decodeId
public static decodeId(byte[] idBytes, int offset, int length)Decode an indexed id back to its original form.- See Also:
encodeId(java.lang.String)
-