Package org.opensearch.index.reindex
Class ScrollableHitSource.BasicHit
java.lang.Object
org.opensearch.index.reindex.ScrollableHitSource.BasicHit
- All Implemented Interfaces:
ScrollableHitSource.Hit
- Enclosing class:
ScrollableHitSource
An implementation of ScrollableHitSource.Hit that uses getters and setters.
- Opensearch.internal:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()
The document id of the hit.getIndex()
The index in which the hit is stored.org.opensearch.core.xcontent.MediaType
The content type of the hit source.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.org.opensearch.core.common.bytes.BytesReference
The source of the hit.long
The version of the match or-1
if the version wasn't requested.void
setPrimaryTerm
(long primaryTerm) setRouting
(String routing) void
setSeqNo
(long seqNo) setSource
(org.opensearch.core.common.bytes.BytesReference source, org.opensearch.core.xcontent.MediaType mediaType)
-
Constructor Details
-
BasicHit
-
-
Method Details
-
getIndex
Description copied from interface:ScrollableHitSource.Hit
The index in which the hit is stored.- Specified by:
getIndex
in interfaceScrollableHitSource.Hit
-
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 OpenSearch's internal APIs.- Specified by:
getVersion
in interfaceScrollableHitSource.Hit
-
getSeqNo
public long getSeqNo()Description copied from interface:ScrollableHitSource.Hit
The sequence number of the match orSequenceNumbers.UNASSIGNED_SEQ_NO
if sequence numbers weren't requested.- Specified by:
getSeqNo
in interfaceScrollableHitSource.Hit
-
getPrimaryTerm
public long getPrimaryTerm()Description copied from interface:ScrollableHitSource.Hit
The primary term of the match orSequenceNumbers.UNASSIGNED_PRIMARY_TERM
if sequence numbers weren't requested.- Specified by:
getPrimaryTerm
in interfaceScrollableHitSource.Hit
-
getSource
public org.opensearch.core.common.bytes.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
-
getMediaType
public org.opensearch.core.xcontent.MediaType getMediaType()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:
getMediaType
in interfaceScrollableHitSource.Hit
-
setSource
public ScrollableHitSource.BasicHit setSource(org.opensearch.core.common.bytes.BytesReference source, org.opensearch.core.xcontent.MediaType mediaType) -
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
-
setSeqNo
public void setSeqNo(long seqNo) -
setPrimaryTerm
public void setPrimaryTerm(long primaryTerm)
-