Class: Google::Apis::CloudsearchV1::FreshnessOptions
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::FreshnessOptions
- Defined in:
- generated/google/apis/cloudsearch_v1/classes.rb,
generated/google/apis/cloudsearch_v1/representations.rb,
generated/google/apis/cloudsearch_v1/representations.rb
Overview
Indicates which freshness property to use when adjusting search ranking for an item. Fresher, more recent dates indicate higher quality. Use the freshness option property that best works with your data. For fileshare documents, last modified time is most relevant. For calendar event data, the time when the event occurs is a more relevant freshness indicator. In this way, calendar events that occur closer to the time of the search query are considered higher quality and ranked accordingly.
Instance Attribute Summary collapse
-
#freshness_duration ⇒ String
The duration (in seconds) after which an object should be considered stale.
-
#freshness_property ⇒ String
This property indicates the freshness level of the object in the index.
Instance Method Summary collapse
-
#initialize(**args) ⇒ FreshnessOptions
constructor
A new instance of FreshnessOptions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ FreshnessOptions
Returns a new instance of FreshnessOptions
1075 1076 1077 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1075 def initialize(**args) update!(**args) end |
Instance Attribute Details
#freshness_duration ⇒ String
The duration (in seconds) after which an object should be considered
stale.
Corresponds to the JSON property freshnessDuration
1058 1059 1060 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1058 def freshness_duration @freshness_duration end |
#freshness_property ⇒ String
This property indicates the freshness level of the object in the index.
If set, this property must be a top-level property within the
PropertyDefinitions
and it must be a
timestamp type
or
date type.
Otherwise, the Indexing API uses
updateTime
as the freshness indicator.
The maximum length is 256 characters.
Corresponds to the JSON property freshnessProperty
1073 1074 1075 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1073 def freshness_property @freshness_property end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1080 1081 1082 1083 |
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 1080 def update!(**args) @freshness_duration = args[:freshness_duration] if args.key?(:freshness_duration) @freshness_property = args[:freshness_property] if args.key?(:freshness_property) end |