public class ElasticSearchDocumentHit extends Object implements ISearchServerDocument
| Constructor and Description |
|---|
ElasticSearchDocumentHit(org.elasticsearch.search.SearchHit hit) |
| Modifier and Type | Method and Description |
|---|---|
<V> Optional<V> |
get(String fieldName)
Shortcut to
ISearchServerDocument.getFieldValue(String). |
<V> Optional<V> |
getFieldPayload(String fieldName) |
<V> Optional<V> |
getFieldValue(String fieldName) |
Optional<List<Object>> |
getFieldValues(String fieldName) |
Map<String,List<String>> |
getHighlights() |
String |
getId() |
String |
getIndexType() |
Map<String,List<ISearchServerDocument>> |
getInnerHits()
Returns inner document hits, if existing.
|
float |
getScore() |
String |
toString() |
public ElasticSearchDocumentHit(org.elasticsearch.search.SearchHit hit)
public Optional<List<Object>> getFieldValues(String fieldName)
getFieldValues in interface ISearchServerDocumentpublic <V> Optional<V> getFieldValue(String fieldName)
getFieldValue in interface ISearchServerDocumentpublic <V> Optional<V> get(String fieldName)
ISearchServerDocumentISearchServerDocument.getFieldValue(String).get in interface ISearchServerDocumentpublic <V> Optional<V> getFieldPayload(String fieldName)
getFieldPayload in interface ISearchServerDocumentpublic Map<String,List<ISearchServerDocument>> getInnerHits()
ISearchServerDocumentReturns inner document hits, if existing. They exist if a nested query was performed and the inner hits were set to be returned and the result document actually has at least one queried inner hit. That means the field value of the nested field must be non-empty on the document.
The keys of the map are the nested field names, e.g. "events" or "sentences". The values are the list of the inner hits - which are documents themselves - for the respective field.
getInnerHits in interface ISearchServerDocumentpublic Map<String,List<String>> getHighlights()
getHighlights in interface ISearchServerDocumentpublic String getId()
getId in interface ISearchServerDocumentpublic String getIndexType()
getIndexType in interface ISearchServerDocumentpublic float getScore()
getScore in interface ISearchServerDocumentCopyright © 2017 JULIE Lab, Germany. All rights reserved.