T
- the result data class.public class SearchHit<T> extends Object
Constructor and Description |
---|
SearchHit(String index,
String id,
String routing,
float score,
Object[] sortValues,
Map<String,List<String>> highlightFields,
Map<String,SearchHits<?>> innerHits,
NestedMetaData nestedMetaData,
Explanation explanation,
List<String> matchedQueries,
T content) |
SearchHit(String index,
String id,
String routing,
float score,
Object[] sortValues,
Map<String,List<String>> highlightFields,
T content)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
T |
getContent() |
Explanation |
getExplanation() |
List<String> |
getHighlightField(String field)
gets the highlight values for a field.
|
Map<String,List<String>> |
getHighlightFields() |
String |
getId() |
String |
getIndex() |
Map<String,SearchHits<?>> |
getInnerHits() |
SearchHits<?> |
getInnerHits(String name)
returns the
SearchHits for the inner hits with the given name. |
List<String> |
getMatchedQueries() |
NestedMetaData |
getNestedMetaData()
If this is a nested inner hit, return the nested metadata information
|
String |
getRouting() |
float |
getScore() |
List<Object> |
getSortValues() |
String |
toString() |
@Deprecated public SearchHit(@Nullable String index, @Nullable String id, @Nullable String routing, float score, @Nullable Object[] sortValues, @Nullable Map<String,List<String>> highlightFields, T content)
SearchHit(String, String, String, float, Object[], Map, Map, NestedMetaData, Explanation, List, Object)
.public SearchHit(@Nullable String index, @Nullable String id, @Nullable String routing, float score, @Nullable Object[] sortValues, @Nullable Map<String,List<String>> highlightFields, @Nullable Map<String,SearchHits<?>> innerHits, @Nullable NestedMetaData nestedMetaData, @Nullable Explanation explanation, @Nullable List<String> matchedQueries, T content)
@Nullable public String getIndex()
public float getScore()
public T getContent()
public List<Object> getSortValues()
public Map<String,List<String>> getHighlightFields()
public List<String> getHighlightField(String field)
field
- must not be null@Nullable public SearchHits<?> getInnerHits(String name)
SearchHits
for the inner hits with the given name. If the inner hits could be mapped to a
nested entity class, the returned data will be of this type, otherwise
{SearchDocument
} instances are returned in this
SearchHits
object.name
- the inner hits nameSearchHits
if available, otherwise nullpublic Map<String,SearchHits<?>> getInnerHits()
SearchHits
object, never null@Nullable public NestedMetaData getNestedMetaData()
NestedMetaData
@Nullable public String getRouting()
@Nullable public Explanation getExplanation()
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.