public interface SearchResult extends BaseSearchResult
| Modifier and Type | Field and Description |
|---|---|
static String |
HIGHLIGHT_END |
static String |
HIGHLIGHT_START
Placeholders used to decorate highlighted areas of the search result
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContent()
Gets the text content of the search result.
|
Integer |
getContentVersion()
Returns the version of the content if available, or
null if there's no version for this result. |
Date |
getCreationDate() |
String |
getCreator()
Deprecated.
since 5.2. Use
getCreatorUser() instead |
ConfluenceUser |
getCreatorUser()
Gets the person who created the entity represented by the search result.
|
String |
getDisplayTitle()
Gets the title of the search result appropriate for displaying to a user.
|
default String |
getDisplayTitleWithHighlights()
Gets the title of the search result appropriate for displaying to a user with matches highlighted.
|
default Optional<String> |
getExplain()
Returns query explanation if it is requested see
ISearch.isExplain(). |
Map<String,String> |
getExtraFields()
If the retrieved documents contain additional fields that cannot be directly accessed by this interface then they
can be retrieved via this method.
|
Set<String> |
getLabels(com.atlassian.user.User user)
Gets the labels on the current search result that are visible to the specified user.
|
Date |
getLastModificationDate()
Gets the last modification date of the entity represented by the search result.
|
String |
getLastModifier()
Deprecated.
since 5.2. Use
getLastModifierUser() instead |
ConfluenceUser |
getLastModifierUser()
Gets the last person to modify the entity represented by the search result.
|
String |
getLastUpdateDescription()
Gets some string describing the last modification to this content.
|
String |
getOwnerTitle()
If this result represents an attachment then this field will return the title of the page or blog post the
attachment is attached to.
|
String |
getOwnerType()
If this result represents an attachment then this field will return the type of the container, a page or
blogpost.
|
Set<String> |
getPersonalLabels()
Gets all the personal labels on the current search result.
|
default String |
getResultExcerpt()
Gets excerpt from the context of the search result.
|
default String |
getResultExcerptWithHighlights()
Gets excerpt from the context of the search result, as
getResultExcerpt(), but in a HTML-safe manner. |
String |
getSpaceKey() |
String |
getSpaceName() |
String |
getStatus()
Gets a string representation of the entity status represented by the search result.
|
String |
getType()
Gets a string representation of the type of the entity represented by the search result.
|
String |
getUrlPath()
Gets the URL path to the search result, relative to the site's context root.
|
boolean |
hasLabels() |
boolean |
isHomePage()
Checks if the search result represents the homepage of a space.
|
getField, getFieldValues, getHandle, isFieldRequestedstatic final String HIGHLIGHT_START
static final String HIGHLIGHT_END
Map<String,String> getExtraFields()
The field names are abstracted from the underlying search implementation and will be centrally defined. Their values are not yet documented.
String getContent()
default String getResultExcerpt()
default String getResultExcerptWithHighlights()
getResultExcerpt(), but in a HTML-safe manner.
Implementations should highlight hits with HIGHLIGHT_START and HIGHLIGHT_END.
The default implementation simply HTML-encode the result of getResultExcerpt().String getType()
ContentEntityObject.getType()ContentTypeAware.getType()String getStatus()
ContentEntityObject.getContentStatus()boolean isHomePage()
Date getLastModificationDate()
@Deprecated String getLastModifier()
getLastModifierUser() insteadConfluenceUser getLastModifierUser()
String getDisplayTitle()
Addressable.getDisplayTitle()default String getDisplayTitleWithHighlights()
String getUrlPath()
Addressable.getUrlPath()String getLastUpdateDescription()
This string is user-supplied, and therefore not internationalised
ContentEntityObject.getVersionComment()String getSpaceName()
String getSpaceKey()
boolean hasLabels()
Set<String> getLabels(com.atlassian.user.User user)
user - filter labels by this userSet<String> getPersonalLabels()
Date getCreationDate()
@Deprecated String getCreator()
getCreatorUser() insteadConfluenceUser getCreatorUser()
String getOwnerType()
String getOwnerTitle()
Integer getContentVersion() throws NumberFormatException
null if there's no version for this result.NumberFormatException - if the document in the index has an unparseable version numberdefault Optional<String> getExplain()
ISearch.isExplain().Copyright © 2003–2019 Atlassian. All rights reserved.