Class: Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb

Overview

Request message for CompletionService.AdvancedCompleteQuery method. .

Defined Under Namespace

Modules: SuggestionType Classes: BoostSpec

Instance Attribute Summary collapse

Instance Attribute Details

#boost_spec::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec

Returns Optional. Specification to boost suggestions matching the condition.

Returns:



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 191

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condtion of the suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifictions, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#completion_config::String

Returns Required. The completion_config of the parent dataStore or engine resource name for which the completion is performed, such as projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig projects/*/locations/global/collections/default_collection/engines/*/completionConfig.

Returns:

  • (::String)

    Required. The completion_config of the parent dataStore or engine resource name for which the completion is performed, such as projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig projects/*/locations/global/collections/default_collection/engines/*/completionConfig.



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 191

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condtion of the suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifictions, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#include_tail_suggestions::Boolean

Returns Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.

Returns:

  • (::Boolean)

    Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 191

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condtion of the suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifictions, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#query::String

Returns Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.

The query can not be empty for most of the suggestion types. If it is empty, an INVALID_ARGUMENT error is returned. The exception is when the suggestion_types contains only the type RECENT_SEARCH, the query can be an empty string. The is called "zero prefix" feature, which returns user's recently searched queries given the empty query.

Returns:

  • (::String)

    Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.

    The query can not be empty for most of the suggestion types. If it is empty, an INVALID_ARGUMENT error is returned. The exception is when the suggestion_types contains only the type RECENT_SEARCH, the query can be an empty string. The is called "zero prefix" feature, which returns user's recently searched queries given the empty query.



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 191

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condtion of the suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifictions, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#query_model::String

Returns Specifies the autocomplete data model. This overrides any model specified in the Configuration > Autocomplete section of the Cloud console. Currently supported values:

  • document - Using suggestions generated from user-imported documents.
  • search-history - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API.
  • user-event - Using suggestions generated from user-imported search events.
  • document-completable - Using suggestions taken directly from user-imported document fields marked as completable.

Default values:

  • document is the default model for regular dataStores.
  • search-history is the default model for site search dataStores.

Returns:

  • (::String)

    Specifies the autocomplete data model. This overrides any model specified in the Configuration > Autocomplete section of the Cloud console. Currently supported values:

    • document - Using suggestions generated from user-imported documents.
    • search-history - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API.
    • user-event - Using suggestions generated from user-imported search events.
    • document-completable - Using suggestions taken directly from user-imported document fields marked as completable.

    Default values:

    • document is the default model for regular dataStores.
    • search-history is the default model for site search dataStores.


191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 191

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condtion of the suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifictions, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#suggestion_types::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::SuggestionType>

Returns Optional. Suggestion types to return. If empty or unspecified, query suggestions are returned. Only one suggestion type is supported at the moment.

Returns:



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 191

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condtion of the suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifictions, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#user_info::Google::Cloud::DiscoveryEngine::V1beta::UserInfo

Returns Optional. Information about the end user.

This should be the same identifier information as UserEvent.user_info and SearchRequest.user_info.

Returns:



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 191

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condtion of the suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifictions, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end

#user_pseudo_id::String

Returns A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website.

This field should NOT have a fixed value such as unknown_visitor.

This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id.

The field must be a UTF-8 encoded string with a length limit of 128.

Returns:

  • (::String)

    A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website.

    This field should NOT have a fixed value such as unknown_visitor.

    This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id.

    The field must be a UTF-8 encoded string with a length limit of 128



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb', line 191

class AdvancedCompleteQueryRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Specification to boost suggestions based on the condtion of the suggestion.
  # @!attribute [rw] condition_boost_specs
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AdvancedCompleteQueryRequest::BoostSpec::ConditionBoostSpec>]
  #     Condition boost specifications. If a suggestion matches multiple
  #     conditions in the specifictions, boost values from these specifications
  #     are all applied and combined in a non-linear way. Maximum number of
  #     specifications is 20.
  #
  #     Note: Currently only support language condition boost.
  class BoostSpec
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Boost applies to suggestions which match a condition.
    # @!attribute [rw] condition
    #   @return [::String]
    #     An expression which specifies a boost condition. The syntax is the same
    #     as [filter expression
    #     syntax](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata#filter-expression-syntax).
    #     Currently, the only supported condition is a list of BCP-47 lang codes.
    #
    #     Example:
    #
    #     * To boost suggestions in languages `en` or `fr`:
    #     `(lang_code: ANY("en", "fr"))`
    # @!attribute [rw] boost
    #   @return [::Float]
    #     Strength of the boost, which should be in [-1, 1].
    #     Negative boost means demotion. Default is 0.0.
    #
    #     Setting to 1.0 gives the suggestions a big promotion. However, it does
    #     not necessarily mean that the top result will be a boosted suggestion.
    #
    #     Setting to -1.0 gives the suggestions a big demotion. However, other
    #     suggestions that are relevant might still be shown.
    #
    #     Setting to 0.0 means no boost applied. The boosting condition is
    #     ignored.
    class ConditionBoostSpec
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Suggestion type to return.
  module SuggestionType
    # Default value.
    SUGGESTION_TYPE_UNSPECIFIED = 0

    # Returns query suggestions.
    QUERY = 1

    # Returns people suggestions.
    PEOPLE = 2

    # Returns content suggestions.
    CONTENT = 3

    # Returns recent search suggestions.
    RECENT_SEARCH = 4

    # Returns Google Workspace suggestions.
    GOOGLE_WORKSPACE = 5
  end
end