Google Cloud Discovery Engine V1 Client - Class SearchResult (1.5.0)

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

Represents the search results.

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

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ SearchResponse

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ id string

Document.id of the searched Document.

↳ document Google\Cloud\DiscoveryEngine\V1\Document

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

↳ chunk Google\Cloud\DiscoveryEngine\V1\Chunk

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.

↳ model_scores array|Google\Protobuf\Internal\MapField

Output only. Google provided available scores.

getId

Document.id of the searched Document.

Returns
Type Description
string

setId

Document.id of the searched Document.

Parameter
Name Description
var string
Returns
Type Description
$this

getDocument

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

Returns
Type Description
Google\Cloud\DiscoveryEngine\V1\Document|null

hasDocument

clearDocument

setDocument

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

Parameter
Name Description
var Google\Cloud\DiscoveryEngine\V1\Document
Returns
Type Description
$this

getChunk

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.

Returns
Type Description
Google\Cloud\DiscoveryEngine\V1\Chunk|null

hasChunk

clearChunk

setChunk

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.

Parameter
Name Description
var Google\Cloud\DiscoveryEngine\V1\Chunk
Returns
Type Description
$this

getModelScores

Output only. Google provided available scores.

Returns
Type Description
Google\Protobuf\Internal\MapField

setModelScores

Output only. Google provided available scores.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this