public static class ScrollableHitSource.BasicHit extends java.lang.Object implements ScrollableHitSource.Hit
Constructor and Description |
---|
BasicHit(java.lang.String index,
java.lang.String type,
java.lang.String id,
long version) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId()
The document id of the hit.
|
java.lang.String |
getIndex()
The index in which the hit is stored.
|
java.lang.String |
getParent()
The document id of the parent of the hit if there is a parent or null if there isn't.
|
java.lang.String |
getRouting()
The routing on the hit if there is any or null if there isn't.
|
BytesReference |
getSource()
The source of the hit.
|
java.lang.Long |
getTimestamp()
The
_timestamp on the hit if one was stored with the hit or null if one wasn't. |
java.lang.Long |
getTTL()
The
_ttl on the hit if one was set on it or null one wasn't. |
java.lang.String |
getType()
The type that the hit has.
|
long |
getVersion()
The version of the match or
-1 if the version wasn't requested. |
XContentType |
getXContentType()
The content type of the hit source.
|
ScrollableHitSource.BasicHit |
setParent(java.lang.String parent) |
ScrollableHitSource.BasicHit |
setRouting(java.lang.String routing) |
ScrollableHitSource.BasicHit |
setSource(BytesReference source,
XContentType xContentType) |
ScrollableHitSource.BasicHit |
setTimestamp(java.lang.Long timestamp) |
ScrollableHitSource.BasicHit |
setTTL(java.lang.Long ttl) |
public BasicHit(java.lang.String index, java.lang.String type, java.lang.String id, long version)
public java.lang.String getIndex()
ScrollableHitSource.Hit
getIndex
in interface ScrollableHitSource.Hit
public java.lang.String getType()
ScrollableHitSource.Hit
getType
in interface ScrollableHitSource.Hit
public java.lang.String getId()
ScrollableHitSource.Hit
getId
in interface ScrollableHitSource.Hit
public long getVersion()
ScrollableHitSource.Hit
-1
if the version wasn't requested. The -1
keeps it inline with Elasticsearch's
internal APIs.getVersion
in interface ScrollableHitSource.Hit
public BytesReference getSource()
ScrollableHitSource.Hit
getSource
in interface ScrollableHitSource.Hit
public XContentType getXContentType()
ScrollableHitSource.Hit
getXContentType
in interface ScrollableHitSource.Hit
public ScrollableHitSource.BasicHit setSource(BytesReference source, XContentType xContentType)
public java.lang.String getParent()
ScrollableHitSource.Hit
getParent
in interface ScrollableHitSource.Hit
public ScrollableHitSource.BasicHit setParent(java.lang.String parent)
public java.lang.String getRouting()
ScrollableHitSource.Hit
getRouting
in interface ScrollableHitSource.Hit
public ScrollableHitSource.BasicHit setRouting(java.lang.String routing)
public java.lang.Long getTimestamp()
ScrollableHitSource.Hit
_timestamp
on the hit if one was stored with the hit or null if one wasn't.getTimestamp
in interface ScrollableHitSource.Hit
public ScrollableHitSource.BasicHit setTimestamp(java.lang.Long timestamp)
public java.lang.Long getTTL()
ScrollableHitSource.Hit
_ttl
on the hit if one was set on it or null one wasn't.getTTL
in interface ScrollableHitSource.Hit
public ScrollableHitSource.BasicHit setTTL(java.lang.Long ttl)