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 Object implements ScrollableHitSource.Hit
An implementation of ScrollableHitSource.Hit that uses getters and setters.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()The document id of the hit.StringgetIndex()The index in which the hit is stored.longgetPrimaryTerm()The primary term of the match orSequenceNumbers.UNASSIGNED_PRIMARY_TERMif sequence numbers weren't requested.StringgetRouting()The routing on the hit if there is any or null if there isn't.longgetSeqNo()The sequence number of the match orSequenceNumbers.UNASSIGNED_SEQ_NOif sequence numbers weren't requested.BytesReferencegetSource()The source of the hit.StringgetType()The type that the hit has.longgetVersion()The version of the match or-1if the version wasn't requested.XContentTypegetXContentType()The content type of the hit source.voidsetPrimaryTerm(long primaryTerm)ScrollableHitSource.BasicHitsetRouting(String routing)voidsetSeqNo(long seqNo)ScrollableHitSource.BasicHitsetSource(BytesReference source, XContentType xContentType)
-
-
-
Method Detail
-
getIndex
public String getIndex()
Description copied from interface:ScrollableHitSource.HitThe index in which the hit is stored.- Specified by:
getIndexin interfaceScrollableHitSource.Hit
-
getType
public String getType()
Description copied from interface:ScrollableHitSource.HitThe type that the hit has.- Specified by:
getTypein interfaceScrollableHitSource.Hit
-
getId
public String getId()
Description copied from interface:ScrollableHitSource.HitThe document id of the hit.- Specified by:
getIdin interfaceScrollableHitSource.Hit
-
getVersion
public long getVersion()
Description copied from interface:ScrollableHitSource.HitThe version of the match or-1if the version wasn't requested. The-1keeps it inline with Elasticsearch's internal APIs.- Specified by:
getVersionin interfaceScrollableHitSource.Hit
-
getSeqNo
public long getSeqNo()
Description copied from interface:ScrollableHitSource.HitThe sequence number of the match orSequenceNumbers.UNASSIGNED_SEQ_NOif sequence numbers weren't requested.- Specified by:
getSeqNoin interfaceScrollableHitSource.Hit
-
getPrimaryTerm
public long getPrimaryTerm()
Description copied from interface:ScrollableHitSource.HitThe primary term of the match orSequenceNumbers.UNASSIGNED_PRIMARY_TERMif sequence numbers weren't requested.- Specified by:
getPrimaryTermin interfaceScrollableHitSource.Hit
-
getSource
public BytesReference getSource()
Description copied from interface:ScrollableHitSource.HitThe 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:
getSourcein interfaceScrollableHitSource.Hit
-
getXContentType
public XContentType getXContentType()
Description copied from interface:ScrollableHitSource.HitThe content type of the hit source. Returns null if the source didn't come back from the search.- Specified by:
getXContentTypein interfaceScrollableHitSource.Hit
-
setSource
public ScrollableHitSource.BasicHit setSource(BytesReference source, XContentType xContentType)
-
getRouting
public String getRouting()
Description copied from interface:ScrollableHitSource.HitThe routing on the hit if there is any or null if there isn't.- Specified by:
getRoutingin interfaceScrollableHitSource.Hit
-
setRouting
public ScrollableHitSource.BasicHit setRouting(String routing)
-
setSeqNo
public void setSeqNo(long seqNo)
-
setPrimaryTerm
public void setPrimaryTerm(long primaryTerm)
-
-