Method: query.debugSearch

Returns Debug information for Cloud Search query API provides the search method.

Note: This API requires a standard end user account to execute. A service account can't perform query API requests directly; to use a service account to perform queries, set up Google Workspace domain-wide delegation of authority.

HTTP request

POST https://cloudsearch.googleapis.com/v1/query:debugSearch

The URL uses gRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestOptions": {
    object (RequestOptions)
  },
  "query": string,
  "pageSize": integer,
  "start": integer,
  "dataSourceRestrictions": [
    {
      object (DataSourceRestriction)
    }
  ],
  "facetOptions": [
    {
      object (FacetOptions)
    }
  ],
  "sortOptions": {
    object (SortOptions)
  },
  "queryInterpretationOptions": {
    object (QueryInterpretationOptions)
  },
  "contextAttributes": [
    {
      object (ContextAttribute)
    }
  ]
}
Fields
requestOptions

object (RequestOptions)

Request options, such as the search application and user timezone.

query

string

The raw query string. See supported search operators in the Narrow your search with operators

pageSize

integer

Maximum number of search results to return in one page. Valid values are between 1 and 100, inclusive. Default value is 10. Minimum value is 50 when results beyond 2000 are requested.

start

integer

Starting index of the results.

dataSourceRestrictions[]

object (DataSourceRestriction)

The sources to use for querying. If not specified, all data sources from the current search application are used.

facetOptions[]

object (FacetOptions)

sortOptions

object (SortOptions)

The options for sorting the search results

queryInterpretationOptions

object (QueryInterpretationOptions)

options to interpret the user query.

contextAttributes[]

object (ContextAttribute)

Context attributes for the request which will be used to adjust ranking of search results. The maximum number of elements is 10.

Response body

Debug query.search Response.

If successful, the response body contains data with the following structure:

JSON representation
{
  "searchResponse": {
    object (SearchResponse)
  },
  "gsrRequest": string,
  "gsrResponse": string
}
Fields
searchResponse

object (SearchResponse)

Query.search response.

gsrRequest

string (bytes format)

Serialized string of GenericSearchRequest.

A base64-encoded string.

gsrResponse

string (bytes format)

Serialized string of GenericSearchResponse.

A base64-encoded string.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud_search.query
  • https://www.googleapis.com/auth/cloud_search

For more information, see the Authorization guide.