Google Cloud Discovery Engine V1 Client - Class RankingRecord (1.7.0)

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

Record message for RankService.Rank method.

Generated from protobuf message google.cloud.discoveryengine.v1.RankingRecord

Namespace

Google \ Cloud \ DiscoveryEngine \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ id
string

The unique ID to represent the record.

↳ title
string

The title of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

↳ content
string

The content of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

↳ score
float

The score of this record based on the given query and selected model. The score will be rounded to 2 decimal places. If the score is close to 0, it will be rounded to 0.0001 to avoid returning unset.

getId

The unique ID to represent the record.

Returns
Type
Description
string

setId

The unique ID to represent the record.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getTitle

The title of the record. Empty by default.

At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

Returns
Type
Description
string

setTitle

The title of the record. Empty by default.

At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getContent

The content of the record. Empty by default.

At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

Returns
Type
Description
string

setContent

The content of the record. Empty by default.

At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getScore

The score of this record based on the given query and selected model.

The score will be rounded to 2 decimal places. If the score is close to 0, it will be rounded to 0.0001 to avoid returning unset.

Returns
Type
Description
float

setScore

The score of this record based on the given query and selected model.

The score will be rounded to 2 decimal places. If the score is close to 0, it will be rounded to 0.0001 to avoid returning unset.

Parameter
Name
Description
var
float
Returns
Type
Description
$this
Design a Mobile Site
View Site in Mobile | Classic
Share by: