public class SearchResult
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Method and Description |
---|---|
List<SearchResultAnswer> |
getAnswers()
Gets the answers.
|
String |
getBody()
Gets the body.
|
SearchResultHighlight |
getHighlight()
Gets the highlight.
|
String |
getId()
Gets the id.
|
SearchResultMetadata |
getResultMetadata()
Gets the resultMetadata.
|
String |
getTitle()
Gets the title.
|
String |
getUrl()
Gets the url.
|
public String getId()
The unique identifier of the document in the Discovery service collection.
This property is included in responses from search skills, which are available only to Plus or Enterprise plan users.
public SearchResultMetadata getResultMetadata()
An object containing search result metadata from the Discovery service.
public 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 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 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 `<em>` tags.
public List<SearchResultAnswer> getAnswers()
An array specifying segments of text within the result that were identified as direct answers to the search query. Currently, only the single answer with the highest confidence (if any) is returned.
**Notes:** - Answer finding is available only if the search skill is connected to a Discovery v2 service instance. - Answer finding is not supported on IBM Cloud Pak for Data.
Copyright © 2023 IBM Cloud. All rights reserved.