Method: query.debugSearch
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Cloud Search 쿼리 API의 디버그 정보를 반환하여 검색 메서드를 제공합니다.
참고: 이 API를 실행하려면 표준 최종 사용자 계정이 필요합니다. 서비스 계정은 쿼리 API 요청을 직접 실행할 수 없습니다. 서비스 계정을 사용하여 쿼리를 실행하려면 Google Workspace 도메인 전체 권한 위임을 설정하세요.
HTTP 요청
POST https://cloudsearch.googleapis.com/v1/query:debugSearch
URL은 gRPC 트랜스코딩 구문을 사용합니다.
요청 본문
요청 본문에는 다음과 같은 구조의 데이터가 포함됩니다.
필드 |
requestOptions |
object (RequestOptions )
검색 애플리케이션 및 사용자 시간대와 같은 옵션을 요청합니다.
|
query |
string
원시 쿼리 문자열입니다. 연산자를 사용하여 검색 범위 좁히기에서 지원되는 검색 연산자를 확인하세요.
|
pageSize |
integer
페이지 하나에 반환할 검색 결과의 최대 수입니다. 유효한 값은 1~100입니다. 기본값은 10입니다. 2,000개를 초과하는 결과를 요청하는 경우 최솟값은 50입니다.
|
start |
integer
결과의 시작 색인입니다.
|
dataSourceRestrictions[] |
object (DataSourceRestriction )
쿼리에 사용할 소스입니다. 지정하지 않으면 현재 검색 애플리케이션의 모든 데이터 소스가 사용됩니다.
|
facetOptions[] |
object (FacetOptions )
|
sortOptions |
object (SortOptions )
검색 결과 정렬 옵션
|
queryInterpretationOptions |
object (QueryInterpretationOptions )
사용자 검색어를 해석하는 옵션
|
contextAttributes[] |
object (ContextAttribute )
검색 결과의 순위를 조정하는 데 사용되는 요청의 컨텍스트 속성입니다. 최대 요소 수는 10개입니다.
|
응답 본문
query.search 응답을 디버그합니다.
성공한 경우 응답 본문은 다음과 같은 구조의 데이터를 포함합니다.
JSON 표현 |
{
"searchResponse": {
object (SearchResponse )
},
"gsrRequest": string,
"gsrResponse": string
} |
필드 |
searchResponse |
object (SearchResponse )
Query.search 응답
|
gsrRequest |
string (bytes format)
GenericSearchRequest의 직렬화된 문자열입니다. base64 인코딩 문자열입니다.
|
gsrResponse |
string (bytes format)
GenericSearchResponse의 직렬화된 문자열입니다. base64 인코딩 문자열입니다.
|
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/cloud_search.query
https://www.googleapis.com/auth/cloud_search
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[],[],null,["# Method: query.debugSearch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.DebugResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns Debug information for Cloud Search query API provides the search method.\n\n**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](https://developers.google.com/workspace/cloud-search/docs/guides/delegation/).\n\n### HTTP request\n\n`POST https://cloudsearch.googleapis.com/v1/query:debugSearch`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestOptions\": { object (/workspace/cloud-search/docs/reference/rest/v1/RequestOptions) }, \"query\": string, \"pageSize\": integer, \"start\": integer, \"dataSourceRestrictions\": [ { object (/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#DataSourceRestriction) } ], \"facetOptions\": [ { object (/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#FacetOptions) } ], \"sortOptions\": { object (/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SortOptions) }, \"queryInterpretationOptions\": { object (/workspace/cloud-search/docs/reference/rest/v1/QueryInterpretationOptions) }, \"contextAttributes\": [ { object (/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items#ContextAttribute) } ] } ``` |\n\n| Fields ||\n|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestOptions` | `object (`[RequestOptions](/workspace/cloud-search/docs/reference/rest/v1/RequestOptions)`)` Request options, such as the search application and user timezone. |\n| `query` | `string` The raw query string. See supported search operators in the [Narrow your search with operators](https://support.google.com/cloudsearch/answer/6172299) |\n| `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. |\n| `start` | `integer` Starting index of the results. |\n| `dataSourceRestrictions[]` | `object (`[DataSourceRestriction](/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#DataSourceRestriction)`)` The sources to use for querying. If not specified, all data sources from the current search application are used. |\n| `facetOptions[]` | `object (`[FacetOptions](/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#FacetOptions)`)` |\n| `sortOptions` | `object (`[SortOptions](/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SortOptions)`)` The options for sorting the search results |\n| `queryInterpretationOptions` | `object (`[QueryInterpretationOptions](/workspace/cloud-search/docs/reference/rest/v1/QueryInterpretationOptions)`)` options to interpret the user query. |\n| `contextAttributes[]` | `object (`[ContextAttribute](/workspace/cloud-search/docs/reference/rest/v1/indexing.datasources.items#ContextAttribute)`)` Context attributes for the request which will be used to adjust ranking of search results. The maximum number of elements is 10. |\n\n### Response body\n\nDebug query.search Response.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"searchResponse\": { object (/workspace/cloud-search/docs/reference/rest/v1/SearchResponse) }, \"gsrRequest\": string, \"gsrResponse\": string } ``` |\n\n| Fields ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `searchResponse` | `object (`[SearchResponse](/workspace/cloud-search/docs/reference/rest/v1/SearchResponse)`)` Query.search response. |\n| `gsrRequest` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` Serialized string of GenericSearchRequest. A base64-encoded string. |\n| `gsrResponse` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` Serialized string of GenericSearchResponse. A base64-encoded string. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud_search.query`\n- `https://www.googleapis.com/auth/cloud_search`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]