com.xpn.xwiki.plugin.lucene
Class SearchResult
java.lang.Object
com.xpn.xwiki.plugin.lucene.SearchResult
public class SearchResult
- extends java.lang.Object
Result of a search. The Plugin will return a collection of these for display on the search page.
- Version:
- $Id: SearchResult.java 24078 2009-09-27 02:37:41Z sdumitriu $
|
Constructor Summary |
SearchResult(org.apache.lucene.document.Document doc,
float score,
com.xpn.xwiki.api.XWiki xwiki)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SearchResult
public SearchResult(org.apache.lucene.document.Document doc,
float score,
com.xpn.xwiki.api.XWiki xwiki)
getId
public java.lang.String getId()
- Returns:
- the document id as indexed
getAuthor
public java.lang.String getAuthor()
- Returns:
- Returns the name of the user who last modified the document.
getDate
public java.util.Date getDate()
- Returns:
- Returns the date of last modification.
getFilename
public java.lang.String getFilename()
- Returns:
- Returns the filename, only used for Attachments (see
getType())
getTitle
public java.lang.String getTitle()
- Returns:
- the title of the document.
getName
public java.lang.String getName()
- Returns:
- Returns the name of the document.
getScore
public float getScore()
- Returns:
- Returns the score of this search result as computed by lucene. Is a float between zero and 1.
getType
public java.lang.String getType()
- Returns:
- Returns the type of the document, atm this can be either
wikipage or
attachment.
getUrl
public java.lang.String getUrl()
- Returns:
- Returns the url to access the document.
getWeb
@Deprecated
public java.lang.String getWeb()
- Deprecated. Use
getSpace() instead.
- Returns:
- Returns the space the document belongs to.
getSpace
public java.lang.String getSpace()
- Returns:
- Returns the space the document belongs to.
getLanguage
public java.lang.String getLanguage()
- Returns:
- the language of the Document, i.e.
de or en,default if no
language was set at indexing time.
getCreationDate
public java.util.Date getCreationDate()
- Returns:
- creationDate of this document
getCreator
public java.lang.String getCreator()
- Returns:
- Username of the creator of the document
setUrl
public void setUrl(java.lang.String url)
getWiki
public java.lang.String getWiki()
getFullName
public java.lang.String getFullName()
getObjects
public java.lang.String[] getObjects()
isWikiContent
public boolean isWikiContent()
- Returns:
- true when this result points to wiki content (attachment, wiki page or object)
Copyright © 2004-2009 XWiki. All Rights Reserved.