Package org.elasticsearch.index.reindex
Interface ScrollableHitSource.Hit
-
- All Known Implementing Classes:
ScrollableHitSource.BasicHit
- Enclosing class:
- ScrollableHitSource
public static interface ScrollableHitSource.HitA document returned as part of the response. Think of it likeSearchHitbut with all the things reindex needs in convenient methods.
-
-
Method Summary
Modifier and Type Method Description java.lang.StringgetId()The document id of the hit.java.lang.StringgetIndex()The index in which the hit is stored.java.lang.StringgetParent()The document id of the parent of the hit if there is a parent or null if there isn't.longgetPrimaryTerm()The primary term of the match orSequenceNumbers.UNASSIGNED_PRIMARY_TERMif sequence numbers weren't requested.java.lang.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.java.lang.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.
-
-
-
Method Detail
-
getIndex
java.lang.String getIndex()
The index in which the hit is stored.
-
getType
java.lang.String getType()
The type that the hit has.
-
getId
java.lang.String getId()
The document id of the hit.
-
getVersion
long getVersion()
The version of the match or-1if the version wasn't requested. The-1keeps it inline with Elasticsearch's internal APIs.
-
getSeqNo
long getSeqNo()
The sequence number of the match orSequenceNumbers.UNASSIGNED_SEQ_NOif sequence numbers weren't requested.
-
getPrimaryTerm
long getPrimaryTerm()
The primary term of the match orSequenceNumbers.UNASSIGNED_PRIMARY_TERMif sequence numbers weren't requested.
-
getSource
@Nullable BytesReference getSource()
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.
-
getXContentType
@Nullable XContentType getXContentType()
The content type of the hit source. Returns null if the source didn't come back from the search.
-
getParent
@Nullable java.lang.String getParent()
The document id of the parent of the hit if there is a parent or null if there isn't.
-
getRouting
@Nullable java.lang.String getRouting()
The routing on the hit if there is any or null if there isn't.
-
-