com.xpn.xwiki.plugin.lucene
Class SearchResult
java.lang.Object
com.xpn.xwiki.plugin.lucene.SearchResult
public class SearchResult
- extends Object
Result of a search. The Plugin will return a collection of these for display on the search page.
- Version:
- $Id$
|
Constructor Summary |
SearchResult(org.apache.lucene.document.Document doc,
float score,
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,
XWiki xwiki)
getId
public String getId()
- Returns:
- the document id as indexed
getAuthor
public String getAuthor()
- Returns:
- Returns the name of the user who last modified the document.
getDate
public Date getDate()
- Returns:
- Returns the date of last modification.
getFilename
public String getFilename()
- Returns:
- Returns the filename, only used for Attachments (see
getType())
getTitle
public String getTitle()
- Returns:
- the title of the document.
getName
public 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 String getType()
- Returns:
- Returns the type of the document, atm this can be either
wikipage or attachment
.
getUrl
public String getUrl()
- Returns:
- Returns the url to access the document.
getWeb
@Deprecated
public String getWeb()
- Deprecated. Use
getSpace() instead.
- Returns:
- Returns the space the document belongs to.
getSpace
public String getSpace()
- Returns:
- Returns the space the document belongs to.
getLanguage
public String getLanguage()
- Returns:
- the language of the Document, i.e.
de or en,default if no language
was set at indexing time.
getCreationDate
public Date getCreationDate()
- Returns:
- creationDate of this document
getCreator
public String getCreator()
- Returns:
- Username of the creator of the document
setUrl
public void setUrl(String url)
getWiki
public String getWiki()
getFullName
public String getFullName()
getObjects
public String[] getObjects()
isWikiContent
public boolean isWikiContent()
- Returns:
- true when this result points to wiki content (attachment, wiki page or object)
Copyright © 2004-2011 XWiki. All Rights Reserved.