Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RankingRecord
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RankingRecord
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discoveryengine_v1/classes.rb,
lib/google/apis/discoveryengine_v1/representations.rb,
lib/google/apis/discoveryengine_v1/representations.rb
Overview
Record message for RankService.Rank method.
Instance Attribute Summary collapse
-
#content ⇒ String
The content of the record.
-
#id ⇒ String
The unique ID to represent the record.
-
#score ⇒ Float
The score of this record based on the given query and selected model.
-
#title ⇒ String
The title of the record.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1RankingRecord
constructor
A new instance of GoogleCloudDiscoveryengineV1RankingRecord.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1RankingRecord
Returns a new instance of GoogleCloudDiscoveryengineV1RankingRecord.
7543 7544 7545 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 7543 def initialize(**args) update!(**args) end |
Instance Attribute Details
#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.
Corresponds to the JSON property content
7523 7524 7525 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 7523 def content @content end |
#id ⇒ String
The unique ID to represent the record.
Corresponds to the JSON property id
7528 7529 7530 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 7528 def id @id end |
#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.
Corresponds to the JSON property score
7535 7536 7537 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 7535 def score @score end |
#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.
Corresponds to the JSON property title
7541 7542 7543 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 7541 def title @title end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7548 7549 7550 7551 7552 7553 |
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 7548 def update!(**args) @content = args[:content] if args.key?(:content) @id = args[:id] if args.key?(:id) @score = args[:score] if args.key?(:score) @title = args[:title] if args.key?(:title) end |