com.xpn.xwiki.plugin.lucene
Class SearchResult

java.lang.Object
  extended by 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: 9a9ea8363f6db3950db2f858d84a39266d36bb21 $

Constructor Summary
SearchResult(org.apache.lucene.document.Document doc, float score, XWiki xwiki)
           
 
Method Summary
 String getAuthor()
           
 Date getCreationDate()
           
 String getCreator()
           
 Date getDate()
           
 org.xwiki.model.reference.DocumentReference getDocumentReference()
           
 String getFilename()
           
 String getFullName()
           
 String getId()
           
 String getLanguage()
           
 String getName()
           
 String[] getObjects()
           
 float getScore()
           
 String getSpace()
           
 String getTitle()
           
 String getType()
           
 String getUrl()
           
 String getWeb()
          Deprecated. Use getSpace() instead.
 String getWiki()
           
 boolean isHidden()
           
 boolean isWikiContent()
           
 void setUrl(String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResult

public SearchResult(org.apache.lucene.document.Document doc,
                    float score,
                    XWiki xwiki)
Method Detail

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)

isHidden

public boolean isHidden()
Returns:
true if the result is marked as "hidden", false otherwise.

getDocumentReference

public org.xwiki.model.reference.DocumentReference getDocumentReference()
Returns:
the reference of the document.


Copyright © 2004-2013 XWiki. All Rights Reserved.