|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.search.CmsSearchResult
public class CmsSearchResult
Contains the data of a single item in a search result.
Field Summary | |
---|---|
protected Date |
m_dateCreated
The creation date of this search result. |
protected Date |
m_dateLastModified
The last modification date of this search result. |
protected String |
m_documentType
The document type of the search result. |
protected String |
m_excerpt
The excerpt of this search result. |
protected Map<String,String> |
m_fields
Holds the values of the search result fields. |
protected String |
m_path
The resource path of this search result. |
protected int |
m_score
The score of this search result. |
Constructor Summary | |
---|---|
protected |
CmsSearchResult()
Empty constructor to be used for overriding classes. |
|
CmsSearchResult(int score,
org.apache.lucene.document.Document doc,
String excerpt)
Creates a new search result. |
Method Summary | |
---|---|
int |
compareTo(CmsSearchResult obj)
|
boolean |
equals(Object obj)
|
Date |
getDateCreated()
Returns the date created. |
Date |
getDateLastModified()
Returns the date last modified. |
String |
getDescription()
Returns the description. |
String |
getDocumentType()
Returns the document type of the search result document. |
String |
getExcerpt()
Returns the excerpt. |
String |
getField(String fieldName)
Returns the text stored in the search index field with the given name. |
String |
getKeywords()
Returns the key words. |
int |
getMemorySize()
Returns the memory size of the object. |
String |
getPath()
Returns the path. |
int |
getScore()
Returns the score. |
String |
getTitle()
Returns the title. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Date m_dateCreated
protected Date m_dateLastModified
protected String m_documentType
protected String m_excerpt
protected Map<String,String> m_fields
protected String m_path
protected int m_score
Constructor Detail |
---|
public CmsSearchResult(int score, org.apache.lucene.document.Document doc, String excerpt)
score
- the score of this search resultdoc
- the Lucene document to extract fields from such as description, title, key words etc. pp.excerpt
- the excerpt of the search result's contentprotected CmsSearchResult()
Method Detail |
---|
public int compareTo(CmsSearchResult obj)
compareTo
in interface Comparable<CmsSearchResult>
Comparable.compareTo(java.lang.Object)
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public Date getDateCreated()
public Date getDateLastModified()
public String getDescription()
public String getDocumentType()
Usually this will be a VFS resource type String that can be used in the
resource type manager with CmsResourceManager.getResourceType(String)
.
However, what is stored in the document type field depends only on the indexer used, and therefore it
may also be some String not referring a VFS resource type but some external type or application.
It may also be null
in case it has not been set by a non-standard indexer.
CmsResourceManager.getResourceType(String)
public String getExcerpt()
public String getField(String fieldName)
fieldName
- the name of the field to get the stored text for
public String getKeywords()
public int getMemorySize()
I_CmsMemoryMonitorable
getMemorySize
in interface I_CmsMemoryMonitorable
I_CmsMemoryMonitorable.getMemorySize()
public String getPath()
public int getScore()
public String getTitle()
public int hashCode()
hashCode
in class Object
Object.hashCode()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |