Google Cloud Discovery Engine V1beta Client - Class RankRequest (0.11.1)

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

Request message for RankService.Rank method.

Generated from protobuf message google.cloud.discoveryengine.v1beta.RankRequest

Namespace

Google \ Cloud \ DiscoveryEngine \ V1beta

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ ranking_config string

Required. The resource name of the rank service config, such as projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config.

↳ model string

The identifier of the model to use. It is one of: * semantic-ranker-512@latest: Semantic ranking model with maxiumn input token size 512. It is set to semantic-ranker-512@latest by default if unspecified.

↳ top_n int

The number of results to return. If this is unset or no bigger than zero, returns all results.

↳ query string

The query to use.

↳ records array<Google\Cloud\DiscoveryEngine\V1beta\RankingRecord>

Required. A list of records to rank. At most 200 records to rank.

↳ ignore_record_details_in_response bool

If true, the response will contain only record ID and score. By default, it is false, the response will contain record details.

getRankingConfig

Required. The resource name of the rank service config, such as projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config.

Returns
Type Description
string

setRankingConfig

Required. The resource name of the rank service config, such as projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config.

Parameter
Name Description
var string
Returns
Type Description
$this

getModel

The identifier of the model to use. It is one of:

  • semantic-ranker-512@latest: Semantic ranking model with maxiumn input token size 512.

It is set to semantic-ranker-512@latest by default if unspecified.

Returns
Type Description
string

setModel

The identifier of the model to use. It is one of:

  • semantic-ranker-512@latest: Semantic ranking model with maxiumn input token size 512.

It is set to semantic-ranker-512@latest by default if unspecified.

Parameter
Name Description
var string
Returns
Type Description
$this

getTopN

The number of results to return. If this is unset or no bigger than zero, returns all results.

Returns
Type Description
int

setTopN

The number of results to return. If this is unset or no bigger than zero, returns all results.

Parameter
Name Description
var int
Returns
Type Description
$this

getQuery

The query to use.

Returns
Type Description
string

setQuery

The query to use.

Parameter
Name Description
var string
Returns
Type Description
$this

getRecords

Required. A list of records to rank. At most 200 records to rank.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setRecords

Required. A list of records to rank. At most 200 records to rank.

Parameter
Name Description
var array<Google\Cloud\DiscoveryEngine\V1beta\RankingRecord>
Returns
Type Description
$this

getIgnoreRecordDetailsInResponse

If true, the response will contain only record ID and score. By default, it is false, the response will contain record details.

Returns
Type Description
bool

setIgnoreRecordDetailsInResponse

If true, the response will contain only record ID and score. By default, it is false, the response will contain record details.

Parameter
Name Description
var bool
Returns
Type Description
$this