|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.search.v2.lucene.LuceneSearchResult
public class LuceneSearchResult
Constructor Summary | |
---|---|
LuceneSearchResult(Hit hit)
Constructor to create a search result directly from a Lucene hit |
|
LuceneSearchResult(Map<String,String> results)
Helper constructor for use in tests. |
Method Summary | |
---|---|
String |
getContent()
Gets the text content of the search result. |
Date |
getCreationDate()
|
String |
getCreator()
|
String |
getDisplayTitle()
Gets the title of the search result appropriate for displaying to a user. |
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. |
Handle |
getHandle()
Retrieves the handle that can then be used by the AnyTypeDao to retrieve the database object referenced by this search result. |
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()
Gets the username of 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. |
String |
getSpaceKey()
|
String |
getSpaceName()
|
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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LuceneSearchResult(Hit hit) throws IOException
hit
- the Lucene hit behind this result
IOException
- if something goes wrong getting data from the hitpublic LuceneSearchResult(Map<String,String> results)
results
- the already-converted map of resultsMethod Detail |
---|
public Map<String,String> getExtraFields()
SearchResult
The field names are abstracted from the underlying search implementation and will be centrally defined. Their values are not yet documented.
getExtraFields
in interface SearchResult
public Handle getHandle()
SearchResult
Because the database and index are not updated at the same time, it is possible for a deleted entity to still be represented in the search index. Do not assume that this handle will always refer to a live object.
getHandle
in interface SearchResult
AnyTypeDao.findByHandle(com.atlassian.bonnie.Handle)
public String getContent()
SearchResult
getContent
in interface SearchResult
public String getType()
SearchResult
ContentEntityObject.getType()
getType
in interface SearchResult
ContentTypeAware.getType()
public boolean isHomePage()
SearchResult
isHomePage
in interface SearchResult
public Date getCreationDate()
getCreationDate
in interface SearchResult
public String getCreator()
getCreator
in interface SearchResult
public String getOwnerType()
SearchResult
getOwnerType
in interface SearchResult
public String getOwnerTitle()
SearchResult
getOwnerTitle
in interface SearchResult
public Date getLastModificationDate()
SearchResult
getLastModificationDate
in interface SearchResult
public String getLastModifier()
SearchResult
getLastModifier
in interface SearchResult
public String getDisplayTitle()
SearchResult
getDisplayTitle
in interface SearchResult
Addressable.getDisplayTitle()
public String getUrlPath()
SearchResult
getUrlPath
in interface SearchResult
Addressable.getUrlPath()
public String getLastUpdateDescription()
SearchResult
This string is user-supplied, and therefore not internationalised
getLastUpdateDescription
in interface SearchResult
ContentEntityObject.getVersionComment()
public String getSpaceName()
getSpaceName
in interface SearchResult
public String getSpaceKey()
getSpaceKey
in interface SearchResult
public boolean hasLabels()
hasLabels
in interface SearchResult
public Set<String> getLabels(com.atlassian.user.User user)
SearchResult
getLabels
in interface SearchResult
user
- filter labels by this user
public Set<String> getPersonalLabels()
SearchResult
getPersonalLabels
in interface SearchResult
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |