Method: query.debugSearch
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Cloud Search क्वेरी एपीआई के लिए डीबग की जानकारी दिखाता है. यह एपीआई, खोज का तरीका बताता है.
ध्यान दें: इस एपीआई को चलाने के लिए, स्टैंडर्ड असली उपयोगकर्ता खाते की ज़रूरत होती है. सेवा खाता, सीधे तौर पर क्वेरी एपीआई के अनुरोधों को पूरा नहीं कर सकता. क्वेरी करने के लिए, सेवा खाते का इस्तेमाल करने के लिए, Google Workspace के डोमेन के लिए, अधिकार देने की सुविधा सेट अप करें.
एचटीटीपी अनुरोध
POST https://cloudsearch.googleapis.com/v1/query:debugSearch
यूआरएल में 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 Response को डीबग करना.
अगर एपीआई सही से जुड़ जाता है, ताे जवाब के मुख्य भाग में नीचे दिए गए स्ट्रक्चर शामिल होता है.
JSON के काेड में दिखाना |
{
"searchResponse": {
object (SearchResponse )
},
"gsrRequest": string,
"gsrResponse": string
} |
फ़ील्ड |
searchResponse |
object (SearchResponse )
Query.search response.
|
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 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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)."]]