Google Cloud Discovery Engine V1beta Client - Class SearchResult (0.8.0)

Reference documentation and code samples for the Google Cloud Discovery Engine V1beta Client class SearchResult.

Represents the search results.

Generated from protobuf message google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult

Namespace

Google \ Cloud \ DiscoveryEngine \ V1beta \ SearchResponse

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ id string

Document.id of the searched Document.

↳ document Google\Cloud\DiscoveryEngine\V1beta\Document

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

↳ model_scores array|Google\Protobuf\Internal\MapField

Google provided available scores.

getId

Document.id of the searched Document.

Returns
TypeDescription
string

setId

Document.id of the searched Document.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDocument

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

Returns
TypeDescription
Google\Cloud\DiscoveryEngine\V1beta\Document|null

hasDocument

clearDocument

setDocument

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

Parameter
NameDescription
var Google\Cloud\DiscoveryEngine\V1beta\Document
Returns
TypeDescription
$this

getModelScores

Google provided available scores.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setModelScores

Google provided available scores.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this