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.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) |
public BasicHit(java.lang.String index,
java.lang.String type,
java.lang.String id,
long version)
public java.lang.String getIndex()
ScrollableHitSource.HitgetIndex in interface ScrollableHitSource.Hitpublic java.lang.String getType()
ScrollableHitSource.HitgetType in interface ScrollableHitSource.Hitpublic java.lang.String getId()
ScrollableHitSource.HitgetId in interface ScrollableHitSource.Hitpublic 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.Hitpublic BytesReference getSource()
ScrollableHitSource.HitgetSource in interface ScrollableHitSource.Hitpublic XContentType getXContentType()
ScrollableHitSource.HitgetXContentType in interface ScrollableHitSource.Hitpublic ScrollableHitSource.BasicHit setSource(BytesReference source, XContentType xContentType)
public java.lang.String getParent()
ScrollableHitSource.HitgetParent in interface ScrollableHitSource.Hitpublic ScrollableHitSource.BasicHit setParent(java.lang.String parent)
public java.lang.String getRouting()
ScrollableHitSource.HitgetRouting in interface ScrollableHitSource.Hitpublic ScrollableHitSource.BasicHit setRouting(java.lang.String routing)