@ParametersAreNonnullByDefault public class ESSearchResult extends AbstractSearchResult
HIGHLIGHT_END, HIGHLIGHT_START
Constructor and Description |
---|
ESSearchResult(com.google.common.base.Function<String,ConfluenceUser> userLookup,
Map<String,Object> sourceDoc) |
ESSearchResult(com.google.common.base.Function<String,ConfluenceUser> userLookup,
Map<String,Object> sourceDoc,
Map<String,String> highlight,
Optional<String> explain) |
Modifier and Type | Method and Description |
---|---|
String |
getDisplayTitleWithHighlights()
Gets the title of the search result appropriate for displaying to a user with matches highlighted.
|
Optional<String> |
getExplain()
Returns query explanation if it is requested see
ISearch.isExplain() . |
String |
getFieldValue(String fieldName)
Return a string value of a field of a given document, if the field has multiple values then return last value,
if there is no such field then return null.
|
Set<String> |
getFieldValues(String fieldName)
Return set of string values of a field of a given document, if the field has single value then return
singleton set of that value, if there is no such field then return empty set.
|
String |
getResultExcerptWithHighlights()
Gets excerpt from the context of the search result, as
SearchResult.getResultExcerpt() , but in a HTML-safe manner. |
boolean |
isFieldRequested(String fieldName)
Deprecated.
|
getContent, getContentVersion, getCreationDate, getCreator, getCreatorUser, getDateResult, getDisplayTitle, getExtraFields, getField, getHandle, getIntegerResult, getLabels, getLastModificationDate, getLastModifier, getLastModifierUser, getLastUpdateDescription, getOwnerTitle, getOwnerType, getPersonalLabels, getResultExcerpt, getResultExcerpt, getSanitisedContent, getSpaceKey, getSpaceName, getStringResult, getType, getUrlPath, getUserResult, hasLabels, isHomePage, toString
public ESSearchResult(com.google.common.base.Function<String,ConfluenceUser> userLookup, Map<String,Object> sourceDoc)
public String getFieldValue(String fieldName)
AbstractSearchResult
getFieldValue
in class AbstractSearchResult
public Set<String> getFieldValues(String fieldName)
AbstractSearchResult
getFieldValues
in interface BaseSearchResult
getFieldValues
in class AbstractSearchResult
public String getResultExcerptWithHighlights()
SearchResult
SearchResult.getResultExcerpt()
, but in a HTML-safe manner.
Implementations should highlight hits with SearchResult.HIGHLIGHT_START
and SearchResult.HIGHLIGHT_END
.
The default implementation simply HTML-encode the result of SearchResult.getResultExcerpt()
.public String getDisplayTitleWithHighlights()
SearchResult
@Deprecated public boolean isFieldRequested(String fieldName)
public Optional<String> getExplain()
SearchResult
ISearch.isExplain()
.Copyright © 2003–2016 Atlassian. All rights reserved.