|
||||||||||
| 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(org.apache.lucene.search.Hit hit)
Constructor to create a search result directly from a Lucene hit |
|
LuceneSearchResult(java.util.Map<java.lang.String,java.lang.String> results)
Helper constructor for use in tests. |
|
| Method Summary | |
|---|---|
java.lang.String |
getContent()
Gets the text content of the search result. |
java.util.Date |
getCreationDate()
|
java.lang.String |
getCreator()
|
java.lang.String |
getDisplayTitle()
Gets the title of the search result appropriate for displaying to a user. |
java.util.Map<java.lang.String,java.lang.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. |
com.atlassian.bonnie.Handle |
getHandle()
Retrieves the handle that can then be used by the AnyTypeObjectDao to retrieve the database object referenced by this search result. |
java.util.Set<java.lang.String> |
getLabels(com.atlassian.user.User user)
Gets the labels on the current search result that are visible to the specified user. |
java.util.Date |
getLastModificationDate()
Gets the last modification date of the entity represented by the search result. |
java.lang.String |
getLastModifier()
Gets the username of the last person to modify the entity represented by the search result. |
java.lang.String |
getLastUpdateDescription()
Gets some string describing the last modification to this content. |
java.lang.String |
getSpaceKey()
|
java.lang.String |
getSpaceName()
|
java.lang.String |
getType()
Gets a string representation of the type of the entity represented by the search result. |
java.lang.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LuceneSearchResult(org.apache.lucene.search.Hit hit)
throws java.io.IOException
hit - the Lucene hit behind this result
java.io.IOException - if something goes wrong getting data from the hitpublic LuceneSearchResult(java.util.Map<java.lang.String,java.lang.String> results)
results - the already-converted map of results| Method Detail |
|---|
public java.util.Map<java.lang.String,java.lang.String> getExtraFields()
SearchResultThe field names are abstracted from the underlying search implementation and will be centrally defined. Their values are not yet documented.
getExtraFields in interface SearchResultpublic com.atlassian.bonnie.Handle getHandle()
SearchResultBecause 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 SearchResultAnyTypeObjectDao.findByHandle(com.atlassian.bonnie.Handle)public java.lang.String getContent()
SearchResult
getContent in interface SearchResultpublic java.lang.String getType()
SearchResultContentEntityObject.getType()
getType in interface SearchResultAddressable.getType()public boolean isHomePage()
SearchResult
isHomePage in interface SearchResultpublic java.util.Date getCreationDate()
getCreationDate in interface SearchResultpublic java.lang.String getCreator()
getCreator in interface SearchResultpublic java.util.Date getLastModificationDate()
SearchResult
getLastModificationDate in interface SearchResultpublic java.lang.String getLastModifier()
SearchResult
getLastModifier in interface SearchResultpublic java.lang.String getDisplayTitle()
SearchResult
getDisplayTitle in interface SearchResultAddressable.getDisplayTitle()public java.lang.String getUrlPath()
SearchResult
getUrlPath in interface SearchResultAddressable.getUrlPath()public java.lang.String getLastUpdateDescription()
SearchResultThis string is user-supplied, and therefore not internationalised
getLastUpdateDescription in interface SearchResultContentEntityObject.getVersionComment()public java.lang.String getSpaceName()
getSpaceName in interface SearchResultpublic java.lang.String getSpaceKey()
getSpaceKey in interface SearchResultpublic boolean hasLabels()
hasLabels in interface SearchResultpublic java.util.Set<java.lang.String> getLabels(com.atlassian.user.User user)
SearchResult
getLabels in interface SearchResultuser - filter labels by this user
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||