Package org.elasticsearch.index.reindex
Class ScrollableHitSource.BasicHit
- java.lang.Object
-
- org.elasticsearch.index.reindex.ScrollableHitSource.BasicHit
-
- All Implemented Interfaces:
ScrollableHitSource.Hit
- Enclosing class:
- ScrollableHitSource
public static class ScrollableHitSource.BasicHit extends java.lang.Object implements ScrollableHitSource.Hit
An implementation of ScrollableHitSource.Hit that uses getters and setters.
-
-
Constructor Summary
Constructors Constructor Description BasicHit(java.lang.String index, java.lang.String type, java.lang.String id, long version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Method Detail
-
getIndex
public java.lang.String getIndex()
Description copied from interface:ScrollableHitSource.Hit
The index in which the hit is stored.- Specified by:
getIndex
in interfaceScrollableHitSource.Hit
-
getType
public java.lang.String getType()
Description copied from interface:ScrollableHitSource.Hit
The type that the hit has.- Specified by:
getType
in interfaceScrollableHitSource.Hit
-
getId
public java.lang.String getId()
Description copied from interface:ScrollableHitSource.Hit
The document id of the hit.- Specified by:
getId
in interfaceScrollableHitSource.Hit
-
getVersion
public long getVersion()
Description copied from interface:ScrollableHitSource.Hit
The version of the match or-1
if the version wasn't requested. The-1
keeps it inline with Elasticsearch's internal APIs.- Specified by:
getVersion
in interfaceScrollableHitSource.Hit
-
getSource
public BytesReference getSource()
Description copied from interface:ScrollableHitSource.Hit
The source of the hit. Returns null if the source didn't come back from the search, usually because it source wasn't stored at all.- Specified by:
getSource
in interfaceScrollableHitSource.Hit
-
getXContentType
public XContentType getXContentType()
Description copied from interface:ScrollableHitSource.Hit
The content type of the hit source. Returns null if the source didn't come back from the search.- Specified by:
getXContentType
in interfaceScrollableHitSource.Hit
-
setSource
public ScrollableHitSource.BasicHit setSource(BytesReference source, XContentType xContentType)
-
getParent
public java.lang.String getParent()
Description copied from interface:ScrollableHitSource.Hit
The document id of the parent of the hit if there is a parent or null if there isn't.- Specified by:
getParent
in interfaceScrollableHitSource.Hit
-
setParent
public ScrollableHitSource.BasicHit setParent(java.lang.String parent)
-
getRouting
public java.lang.String getRouting()
Description copied from interface:ScrollableHitSource.Hit
The routing on the hit if there is any or null if there isn't.- Specified by:
getRouting
in interfaceScrollableHitSource.Hit
-
setRouting
public ScrollableHitSource.BasicHit setRouting(java.lang.String routing)
-
-