|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.search.SearchHit
@StableMinor(version="6.2", 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 String |
snippet
|
protected String |
subtitle
|
protected String |
title
|
protected String |
url
|
Constructor Summary | |
---|---|
SearchHit()
Constructs an instance with null URL, title and subtitle predefined fields. |
|
SearchHit(String url,
String title,
String subtitle)
Constructs an instance with the given URL, title and subtitle predefined fields. |
Method Summary | |
---|---|
SearchAttributes |
getAttributes()
Returns the hit's attributes . |
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 . |
String |
getSnippet()
Returns the snippet value. |
String |
getSubtitle()
Returns the subtitle field value. |
String |
getTitle()
Returns the title field value. |
String |
getUrl()
Returns the URL field value. |
void |
setParentId(String parentId)
Sets the parent identifier of this hit. |
void |
setRank(float rank)
Sets the rank value. |
void |
setSnippet(String snippet)
Sets the the snippet value. |
void |
setSubtitle(String subtitle)
Sets the subtitle field value. |
void |
setTitle(String title)
Sets the title field value. |
void |
setUrl(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 String url
protected String title
protected String subtitle
protected String snippet
protected float rank
protected SearchAttributes attributes
Constructor Detail |
---|
public SearchHit()
SearchContentField.FIELDNAME_URL
,
SearchContentField.FIELDNAME_TITLE
,
SearchContentField.FIELDNAME_SUBTITLE
public SearchHit(String url, String title, String subtitle)
url
- URL field valuetitle
- title fieldsubtitle
- subtitle fieldSearchContentField.FIELDNAME_URL
,
SearchContentField.FIELDNAME_TITLE
,
SearchContentField.FIELDNAME_SUBTITLE
Method Detail |
---|
public String getUrl()
SearchContentField.FIELDNAME_URL
public void setUrl(String url)
url
- URL field valueSearchContentField.FIELDNAME_URL
public String getTitle()
SearchContentField.FIELDNAME_TITLE
public void setTitle(String title)
title
- title field valueSearchContentField.FIELDNAME_TITLE
public String getSubtitle()
SearchContentField.FIELDNAME_SUBTITLE
public void setSubtitle(String subtitle)
subtitle
- subtitle field valueSearchContentField.FIELDNAME_SUBTITLE
public float getRank()
public void setRank(float rank)
rank
- rank valuepublic String getSnippet()
public void setSnippet(String snippet)
snippet
- snippet valuepublic 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(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 |