Interface SearchDocument
- All Known Implementing Classes:
SearchDocumentAdapter
Extension to
Document
exposing search response related data.- Since:
- 4.0
- Author:
- Mark Paluch, Peter-Josef Meisch, Matt Gilene
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault <V> V
getFieldValue
(String name) The first value of the given field.default Map<String,
SearchDocumentResponse> default NestedMetaData
default String
float
getScore()
Return the searchscore
.default Object[]
Methods inherited from interface org.springframework.data.elasticsearch.core.document.Document
fromJson, getId, getIndex, getPrimaryTerm, getSeqNo, getVersion, hasId, hasPrimaryTerm, hasSeqNo, hasVersion, setId, setIndex, setPrimaryTerm, setSeqNo, setVersion, transform
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from interface org.springframework.data.elasticsearch.support.StringObjectMap
append, get, getBoolean, getBooleanOrDefault, getBooleanOrDefault, getInt, getIntOrDefault, getIntOrDefault, getLong, getLongOrDefault, getLongOrDefault, getString, getStringOrDefault, getStringOrDefault, toJson
-
Method Details
-
getScore
float getScore()Return the searchscore
.- Returns:
- the search
score
.
-
getFields
- Returns:
- the fields for the search result, not null
-
getFieldValue
The first value of the given field.- Parameters:
name
- the field name
-
getSortValues
- Returns:
- the sort values for the search hit
-
getHighlightFields
- Returns:
- the highlightFields for the search hit.
-
getInnerHits
- Returns:
- the innerHits for the SearchHit
- Since:
- 4.1
-
getNestedMetaData
- Returns:
- the nested metadata in case this is a nested inner hit.
- Since:
- 4.1
-
getRouting
- Returns:
- the routing value for the document
- Since:
- 4.2
-
getExplanation
- Returns:
- the explanation for the SearchHit.
- Since:
- 4.2
-
getMatchedQueries
- Returns:
- the matched queries for the SearchHit.
-