Package org.elasticsearch.index.reindex
Interface ScrollableHitSource.Hit
- All Known Implementing Classes:
ScrollableHitSource.BasicHit
- Enclosing class:
- ScrollableHitSource
public static interface ScrollableHitSource.Hit
A document returned as part of the response. Think of it like
SearchHit
but with all the things reindex needs in convenient
methods.-
Method Summary
Modifier and TypeMethodDescriptiongetId()
The document id of the hit.getIndex()
The index in which the hit is stored.long
The primary term of the match orSequenceNumbers.UNASSIGNED_PRIMARY_TERM
if sequence numbers weren't requested.The routing on the hit if there is any or null if there isn't.long
getSeqNo()
The sequence number of the match orSequenceNumbers.UNASSIGNED_SEQ_NO
if sequence numbers weren't requested.The source of the hit.getType()
The type that the hit has.long
The version of the match or-1
if the version wasn't requested.The content type of the hit source.
-
Method Details
-
getIndex
String getIndex()The index in which the hit is stored. -
getType
String getType()The type that the hit has. -
getId
String getId()The document id of the hit. -
getVersion
long getVersion()The version of the match or-1
if the version wasn't requested. The-1
keeps it inline with Elasticsearch's internal APIs. -
getSeqNo
long getSeqNo()The sequence number of the match orSequenceNumbers.UNASSIGNED_SEQ_NO
if sequence numbers weren't requested. -
getPrimaryTerm
long getPrimaryTerm()The primary term of the match orSequenceNumbers.UNASSIGNED_PRIMARY_TERM
if sequence numbers weren't requested. -
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
The content type of the hit source. Returns null if the source didn't come back from the search. -
getRouting
The routing on the hit if there is any or null if there isn't.
-