|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlumis.search.SearchHit
@StableMinor(version="6.1", sinceVersion="4.0") public abstract class SearchHit
An item of a SearchResults
object.
It represents an indexed information that match a query
that was
executed
.
A SearchHit object returns some of the predefined fields (Title, Subtitle, URL) of the original indexed information, and the following additional fields:
Field Summary | |
---|---|
protected SearchAttributes |
attributes
|
protected float |
rank
|
protected java.lang.String |
snippet
|
protected java.lang.String |
subtitle
|
protected java.lang.String |
title
|
protected java.lang.String |
url
|
Constructor Summary | |
---|---|
SearchHit()
Constructs an instance with null URL, title and subtitle predefined fields. |
|
SearchHit(java.lang.String url,
java.lang.String title,
java.lang.String subtitle)
Constructs an instance with the given URL, title and subtitle predefined fields. |
Method Summary | |
---|---|
SearchAttributes |
getAttributes()
Returns the hit's attributes . |
java.lang.String |
getParentId()
Returns the identifier of the parent of this hit. |
float |
getRank()
Returns the rank value. |
SearchContent |
getSearchContent()
Returns a SearchContent object related to the hit, containing all
fields . |
java.lang.String |
getSnippet()
Returns the snippet value. |
java.lang.String |
getSubtitle()
Returns the subtitle field value. |
java.lang.String |
getTitle()
Returns the title field value. |
java.lang.String |
getUrl()
Returns the URL field value. |
void |
setParentId(java.lang.String parentId)
Sets the parent identifier of this hit. |
void |
setRank(float rank)
Sets the rank value. |
void |
setSnippet(java.lang.String snippet)
Sets the the snippet value. |
void |
setSubtitle(java.lang.String subtitle)
Sets the subtitle field value. |
void |
setTitle(java.lang.String title)
Sets the title field value. |
void |
setUrl(java.lang.String url)
Sets the URL field value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String url
protected java.lang.String title
protected java.lang.String subtitle
protected java.lang.String snippet
protected float rank
protected SearchAttributes attributes
Constructor Detail |
---|
public SearchHit()
SearchContentField.FIELDNAME_URL
,
SearchContentField.FIELDNAME_TITLE
,
SearchContentField.FIELDNAME_SUBTITLE
public SearchHit(java.lang.String url, java.lang.String title, java.lang.String subtitle)
url
- URL field valuetitle
- title fieldsubtitle
- subtitle fieldSearchContentField.FIELDNAME_URL
,
SearchContentField.FIELDNAME_TITLE
,
SearchContentField.FIELDNAME_SUBTITLE
Method Detail |
---|
public java.lang.String getUrl()
SearchContentField.FIELDNAME_URL
public void setUrl(java.lang.String url)
url
- URL field valueSearchContentField.FIELDNAME_URL
public java.lang.String getTitle()
SearchContentField.FIELDNAME_TITLE
public void setTitle(java.lang.String title)
title
- title field valueSearchContentField.FIELDNAME_TITLE
public java.lang.String getSubtitle()
SearchContentField.FIELDNAME_SUBTITLE
public void setSubtitle(java.lang.String subtitle)
subtitle
- subtitle field valueSearchContentField.FIELDNAME_SUBTITLE
public float getRank()
public void setRank(float rank)
rank
- rank valuepublic java.lang.String getSnippet()
public void setSnippet(java.lang.String snippet)
snippet
- snippet valuepublic java.lang.String getParentId()
SearchContent
is indexed, the indexer may divide it into
multiple entries. In this case a primary one should be set as the parent
of the others.
null
if this is a primary hit.public void setParentId(java.lang.String parentId)
parentId
- the parent identifier to set.getParentId()
public SearchAttributes getAttributes()
attributes
.
Attributes contain additional information returned by the
search engine in a query
execution
.
attributes
public SearchContent getSearchContent() throws UnsupportedOperationException
SearchContent
object related to the hit, containing all
fields
.
Implementations that do not support this opperation will throw an
UnsupportedOperationException
.
SearchContent
object related to the hit.
UnsupportedOperationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |