public class SearchResult
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
body |
protected SearchResultHighlight |
highlight |
protected java.lang.String |
id |
protected SearchResultMetadata |
resultMetadata |
protected java.lang.String |
title |
protected java.lang.String |
url |
Constructor and Description |
---|
SearchResult() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBody()
Gets the body.
|
SearchResultHighlight |
getHighlight()
Gets the highlight.
|
java.lang.String |
getId()
Gets the id.
|
SearchResultMetadata |
getResultMetadata()
Gets the resultMetadata.
|
java.lang.String |
getTitle()
Gets the title.
|
java.lang.String |
getUrl()
Gets the url.
|
protected java.lang.String id
@SerializedName(value="result_metadata") protected SearchResultMetadata resultMetadata
protected java.lang.String body
protected java.lang.String title
protected java.lang.String url
protected SearchResultHighlight highlight
public java.lang.String getId()
The unique identifier of the document in the Discovery service collection.
This property is included in responses from search skills, which are a beta feature available only to Plus or Premium plan users.
public SearchResultMetadata getResultMetadata()
An object containing search result metadata from the Discovery service.
public java.lang.String getBody()
A description of the search result. This is taken from an abstract, summary, or highlight field in the Discovery service response, as specified in the search skill configuration.
public java.lang.String getTitle()
The title of the search result. This is taken from a title or name field in the Discovery service response, as specified in the search skill configuration.
public java.lang.String getUrl()
The URL of the original data object in its native data source.
public SearchResultHighlight getHighlight()
An object containing segments of text from search results with query-matching text highlighted using HTML `` tags.