@Deprecated @StableMinor(version="12.3", sinceVersion="4.0") public abstract class SearchHit extends Object
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:
Modifier and Type | Field and Description |
---|---|
protected SearchAttributes |
attributes
Deprecated.
|
protected float |
rank
Deprecated.
|
protected String |
snippet
Deprecated.
|
protected String |
subtitle
Deprecated.
|
protected String |
title
Deprecated.
|
protected String |
url
Deprecated.
|
Constructor and Description |
---|
SearchHit()
Deprecated.
Constructs an instance with null URL, title and subtitle
predefined fields.
|
SearchHit(String url,
String title,
String subtitle)
Deprecated.
Constructs an instance with the given URL, title and subtitle
predefined fields.
|
Modifier and Type | Method and Description |
---|---|
SearchAttributes |
getAttributes()
Deprecated.
Returns the hit's
attributes . |
String |
getParentId()
Deprecated.
Returns the identifier of the parent of this hit.
|
float |
getRank()
Deprecated.
Returns the rank value.
|
SearchContent |
getSearchContent()
Deprecated.
Returns a
SearchContent object related to the hit, containing all
fields . |
String |
getSnippet()
Deprecated.
Returns the snippet value.
|
String |
getSubtitle()
Deprecated.
Returns the subtitle field
value.
|
String |
getTitle()
Deprecated.
Returns the title field value.
|
String |
getUrl()
Deprecated.
Returns the URL field value.
|
void |
setParentId(String parentId)
Deprecated.
Sets the parent identifier of this hit.
|
void |
setRank(float rank)
Deprecated.
Sets the rank value.
|
void |
setSnippet(String snippet)
Deprecated.
Sets the the snippet value.
|
void |
setSubtitle(String subtitle)
Deprecated.
Sets the subtitle field value.
|
void |
setTitle(String title)
Deprecated.
Sets the title field value.
|
void |
setUrl(String url)
Deprecated.
Sets the URL field value.
|
protected String url
protected String title
protected String subtitle
protected String snippet
protected float rank
protected SearchAttributes attributes
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
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 operation will throw an
UnsupportedOperationException
.
SearchContent
object related to the hit.UnsupportedOperationException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.