Discovery Engine v1 API - Class RankRequest (1.3.0)

public sealed class RankRequest : IMessage<RankRequest>, IEquatable<RankRequest>, IDeepCloneable<RankRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Discovery Engine v1 API class RankRequest.

Request message for [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] method.

Inheritance

object > RankRequest

Namespace

Google.Cloud.DiscoveryEngine.V1

Assembly

Google.Cloud.DiscoveryEngine.V1.dll

Constructors

RankRequest()

public RankRequest()

RankRequest(RankRequest)

public RankRequest(RankRequest other)
Parameter
Name Description
other RankRequest

Properties

IgnoreRecordDetailsInResponse

public bool IgnoreRecordDetailsInResponse { get; set; }

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

Property Value
Type Description
bool

Model

public string Model { get; set; }

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.

Property Value
Type Description
string

Query

public string Query { get; set; }

The query to use.

Property Value
Type Description
string

RankingConfig

public string RankingConfig { get; set; }

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

Property Value
Type Description
string

RankingConfigAsRankingConfigName

public RankingConfigName RankingConfigAsRankingConfigName { get; set; }

RankingConfigName-typed view over the RankingConfig resource name property.

Property Value
Type Description
RankingConfigName

Records

public RepeatedField<RankingRecord> Records { get; }

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

Property Value
Type Description
RepeatedFieldRankingRecord

TopN

public int TopN { get; set; }

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

Property Value
Type Description
int

UserLabels

public MapField<string, string> UserLabels { get; }

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.

Property Value
Type Description
MapFieldstringstring