Discovery Engine API . projects . locations . dataStores

Instance Methods

branches()

Returns the branches Resource.

conversations()

Returns the conversations Resource.

models()

Returns the models Resource.

operations()

Returns the operations Resource.

schemas()

Returns the schemas Resource.

servingConfigs()

Returns the servingConfigs Resource.

userEvents()

Returns the userEvents Resource.

close()

Close httplib2 connections.

completeQuery(dataStore, includeTailSuggestions=None, query=None, queryModel=None, userPseudoId=None, x__xgafv=None)

Completes the specified user input with keyword suggestions.

Method Details

close()
Close httplib2 connections.
completeQuery(dataStore, includeTailSuggestions=None, query=None, queryModel=None, userPseudoId=None, x__xgafv=None)
Completes the specified user input with keyword suggestions.

Args:
  dataStore: string, Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. (required)
  includeTailSuggestions: 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.
  query: string, Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.
  queryModel: string, Selects data model of query suggestions for serving. 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 IndustryVertical.SITE_SEARCH dataStores.
  userPseudoId: 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 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for CompletionService.CompleteQuery method.
  "querySuggestions": [ # Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.
    { # Suggestions as search queries.
      "completableFieldPaths": [ # The unique document field paths that serve as the source of this suggestion if it was generated from completable fields. This field is only populated for the document-completable model.
        "A String",
      ],
      "suggestion": "A String", # The suggestion for the query.
    },
  ],
  "tailMatchTriggered": True or False, # True if the returned suggestions are all tail suggestions. For tail matching to be triggered, include_tail_suggestions in the request must be true and there must be no suggestions that match the full query.
}