Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class RankRequest.
Request message for RankService.Rank method.
Generated from protobuf message google.cloud.discoveryengine.v1.RankRequest
Namespace
Google \ Cloud \ DiscoveryEngine \ V1Methods
__construct
Constructor.
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}/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 maximum 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
↳ 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.
↳ user_labels
array| Google\Protobuf\Internal\MapField
The user labels applied to a resource must meet the following requirements: * * Each resource can have multiple labels, up to a maximum of 64. * * Each label must be a key-value pair. * * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * * The key portion of a label must be unique. However, you can use the same key with multiple resources. * * Keys must start with a lowercase letter or international character. See Google Cloud Document for more details.
getRankingConfig
Required. The resource name of the rank service config, such as projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config
.
string
setRankingConfig
Required. The resource name of the rank service config, such as projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config
.
var
string
$this
getModel
The identifier of the model to use. It is one of:
-
semantic-ranker-512@latest
: Semantic ranking model with maximum input token size 512.
It is set to semantic-ranker-512@latest
by default if unspecified.
string
setModel
The identifier of the model to use. It is one of:
-
semantic-ranker-512@latest
: Semantic ranking model with maximum input token size 512.
It is set to semantic-ranker-512@latest
by default if unspecified.
var
string
$this
getTopN
The number of results to return. If this is unset or no bigger than zero, returns all results.
int
setTopN
The number of results to return. If this is unset or no bigger than zero, returns all results.
var
int
$this
getQuery
The query to use.
string
setQuery
The query to use.
var
string
$this
getRecords
Required. A list of records to rank. At most 200 records to rank.
setRecords
Required. A list of records to rank. At most 200 records to rank.
$this
getIgnoreRecordDetailsInResponse
If true, the response will contain only record ID and score. By default, it is false, the response will contain record details.
bool
setIgnoreRecordDetailsInResponse
If true, the response will contain only record ID and score. By default, it is false, the response will contain record details.
var
bool
$this
getUserLabels
The user labels applied to a resource must meet the following requirements:
-
Each resource can have multiple labels, up to a maximum of 64.
-
Each label must be a key-value pair.
- Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
- Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
- The key portion of a label must be unique. However, you can use the same key with multiple resources.
- Keys must start with a lowercase letter or international character. See Google Cloud Document for more details.
setUserLabels
The user labels applied to a resource must meet the following requirements:
-
Each resource can have multiple labels, up to a maximum of 64.
-
Each label must be a key-value pair.
- Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
- Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
- The key portion of a label must be unique. However, you can use the same key with multiple resources.
- Keys must start with a lowercase letter or international character. See Google Cloud Document for more details.
$this