Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="cloudsearch_v1.html">Cloud Search API</a> . <a href="cloudsearch_v1.query.html">query</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="cloudsearch_v1.query.sources.html">sources()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the sources Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 83 | <code><a href="#search">search(body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 84 | <p class="firstline">The Cloud Search Query API provides the search method, which returns</p> |
| 85 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 86 | <code><a href="#suggest">suggest(body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 87 | <p class="firstline">Provides suggestions for autocompleting the query.</p> |
| 88 | <h3>Method Details</h3> |
| 89 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code class="details" id="search">search(body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 91 | <pre>The Cloud Search Query API provides the search method, which returns |
| 92 | the most relevant results from a user query. The results can come from |
| 93 | G Suite Apps, such as Gmail or Google Drive, or they can come from data |
| 94 | that you have indexed from a third party. |
| 95 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 96 | **Note:** This API requires a standard end user account to execute. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 97 | A service account can't perform Query API requests directly; to use a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 98 | service account to perform queries, set up [G Suite domain-wide delegation |
| 99 | of |
| 100 | authority](https://developers.google.com/cloud-search/docs/guides/delegation/). |
| 101 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 102 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 103 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 104 | The object takes the form of: |
| 105 | |
| 106 | { # The search API request. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 107 | "dataSourceRestrictions": [ # The sources to use for querying. If not specified, all data sources |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 108 | # from the current search application are used. |
| 109 | { # Restriction on Datasource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 110 | "filterOptions": [ # Filter options restricting the results. If multiple filters |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 111 | # are present, they are grouped by object type before joining. |
| 112 | # Filters with the same object type are joined conjunctively, then |
| 113 | # the resulting expressions are joined disjunctively. |
| 114 | # |
| 115 | # The maximum number of elements is 20. |
| 116 | # |
| 117 | # NOTE: Suggest API supports only few filters at the moment: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 118 | # "objecttype", "type" and "mimetype". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 119 | # For now, schema specific filters cannot be used to filter suggestions. |
| 120 | { # Filter options to be applied on query. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 121 | "filter": { # A generic way of expressing filters in a query, which supports two # Generic filter to restrict the search, such as `lang:en`, `site:xyz`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 122 | # approaches: <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 123 | # **1. Setting a ValueFilter.** The name must match an operator_name defined in |
| 124 | # the schema for your data source. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 125 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 126 | # **2. Setting a CompositeFilter.** The filters are evaluated |
| 127 | # using the logical operator. The top-level operators can only be either an AND |
| 128 | # or a NOT. AND can appear only at the top-most level. OR can appear only under |
| 129 | # a top-level AND. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 130 | "valueFilter": { |
| 131 | "operatorName": "A String", # The `operator_name` applied to the query, such as *price_greater_than*. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 132 | # The filter can work against both types of filters defined in the schema |
| 133 | # for your data source: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 134 | # <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 135 | # 1. `operator_name`, where the query filters results by the property |
| 136 | # that matches the value. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 137 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 138 | # 2. `greater_than_operator_name` or `less_than_operator_name` in your |
| 139 | # schema. The query filters the results for the property values that are |
| 140 | # greater than or less than the supplied value in the query. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 141 | "value": { # Definition of a single value with generic type. # The value to be compared with. |
| 142 | "integerValue": "A String", |
| 143 | "stringValue": "A String", |
| 144 | "dateValue": { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. |
| 145 | "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. |
| 146 | "year": 42, # Year of date. Must be from 1 to 9999. |
| 147 | "month": 42, # Month of date. Must be from 1 to 12. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 148 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 149 | "doubleValue": 3.14, |
| 150 | "timestampValue": "A String", |
| 151 | "booleanValue": True or False, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 152 | }, |
| 153 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 154 | "compositeFilter": { |
| 155 | "logicOperator": "A String", # The logic operator of the sub filter. |
| 156 | "subFilters": [ # Sub filters. |
| 157 | # Object with schema name: Filter |
| 158 | ], |
| 159 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 160 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 161 | "objectType": "A String", # If object_type is set, only objects of that type are returned. This should |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 162 | # correspond to the name of the object that was registered within the |
| 163 | # definition of schema. The maximum length is 256 characters. |
| 164 | }, |
| 165 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 166 | "source": { # Defines sources for the suggest/search APIs. # The source of restriction. |
| 167 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 168 | "name": "A String", # Source name for content indexed by the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 169 | # Indexing API. |
| 170 | }, |
| 171 | }, |
| 172 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 173 | "sortOptions": { # The options for sorting the search results |
| 174 | "sortOrder": "A String", # Ascending is the default sort order |
| 175 | "operatorName": "A String", # Name of the operator corresponding to the field to sort on. |
| 176 | # The corresponding property must be marked as |
| 177 | # sortable. |
| 178 | }, |
| 179 | "facetOptions": [ |
| 180 | { # Specifies operators to return facet results for. There will be one |
| 181 | # FacetResult for every source_name/object_type/operator_name combination. |
| 182 | "numFacetBuckets": 42, # Maximum number of facet buckets that should be returned for this facet. |
| 183 | # Defaults to 10. |
| 184 | # Maximum value is 100. |
| 185 | "sourceName": "A String", # Source name to facet on. Format: datasources/{source_id} |
| 186 | # If empty, all data sources will be used. |
| 187 | "operatorName": "A String", # Name of the operator chosen for faceting. @see |
| 188 | # cloudsearch.SchemaPropertyOptions |
| 189 | "objectType": "A String", # If object_type is set, only those objects of that type will be used to |
| 190 | # compute facets. If empty, then all objects will be used to compute facets. |
| 191 | }, |
| 192 | ], |
| 193 | "pageSize": 42, # Maximum number of search results to return in one page. |
| 194 | # Valid values are between 1 and 100, inclusive. |
| 195 | # Default value is 10. |
| 196 | "query": "A String", # The raw query string. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 197 | # See supported search operators in the [Cloud search |
| 198 | # Cheat |
| 199 | # Sheet](https://gsuite.google.com/learning-center/products/cloudsearch/cheat-sheet/) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 200 | "start": 42, # Starting index of the results. |
| 201 | "queryInterpretationOptions": { # Options to interpret user query. # Options to interpret the user query. |
| 202 | "enableVerbatimMode": True or False, # Enable this flag to turn off all internal optimizations like natural |
| 203 | # language (NL) interpretation of queries, supplemental result retrieval, |
| 204 | # and usage of synonyms including custom ones. |
| 205 | # Nl interpretation will be disabled if either one of the two flags is true. |
| 206 | "disableNlInterpretation": True or False, # Flag to disable natural language (NL) interpretation of queries. Default is |
| 207 | # false, Set to true to disable natural language interpretation. NL |
| 208 | # interpretation only applies to predefined datasources. |
| 209 | }, |
| 210 | "requestOptions": { # Shared request options for all RPC methods. # Request options, such as the search application and user timezone. |
| 211 | "languageCode": "A String", # The BCP-47 language code, such as "en-US" or "sr-Latn". |
| 212 | # For more information, see |
| 213 | # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. |
| 214 | # For translations. |
| 215 | # |
| 216 | # Set this field using the language set in browser or for the page. In the |
| 217 | # event that the user's language preference is known, set this field to the |
| 218 | # known user language. |
| 219 | # |
| 220 | # When specified, the documents in search results are biased towards the |
| 221 | # specified language. |
| 222 | # |
| 223 | # The suggest API does not use this parameter. Instead, suggest autocompletes |
| 224 | # only based on characters in the query. |
| 225 | "timeZone": "A String", # Current user's time zone id, such as "America/Los_Angeles" or |
| 226 | # "Australia/Sydney". These IDs are defined by |
| 227 | # [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) |
| 228 | # project, and currently available in the file |
| 229 | # [timezone.xml](http://unicode.org/repos/cldr/trunk/common/bcp47/timezone.xml). |
| 230 | # This field is used to correctly interpret date and time queries. |
| 231 | # If this field is not specified, the default time zone (UTC) is used. |
| 232 | "debugOptions": { # Shared request debug options for all cloudsearch RPC methods. # Debug options of the request |
| 233 | "enableDebugging": True or False, # If you are asked by Google to help with debugging, set this field. |
| 234 | # Otherwise, ignore this field. |
| 235 | }, |
| 236 | "searchApplicationId": "A String", # The ID generated when you create a search application using the |
| 237 | # [admin console](https://support.google.com/a/answer/9043922). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 238 | }, |
| 239 | } |
| 240 | |
| 241 | x__xgafv: string, V1 error format. |
| 242 | Allowed values |
| 243 | 1 - v1 error format |
| 244 | 2 - v2 error format |
| 245 | |
| 246 | Returns: |
| 247 | An object of the form: |
| 248 | |
| 249 | { # The search API response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 250 | "errorInfo": { # Error information about the response. # Error information about the response. |
| 251 | "errorMessages": [ |
| 252 | { # Error message per source response. |
| 253 | "errorMessage": "A String", |
| 254 | "source": { # Defines sources for the suggest/search APIs. |
| 255 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 256 | "name": "A String", # Source name for content indexed by the |
| 257 | # Indexing API. |
| 258 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 259 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 260 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 261 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 262 | "hasMoreResults": True or False, # Whether there are more search results matching the query. |
| 263 | "queryInterpretation": { # Query interpretation result for user query. Empty if query interpretation |
| 264 | # is disabled. |
| 265 | "reason": "A String", # The reason for interpretation of the query. This field will not be |
| 266 | # UNSPECIFIED if the interpretation type is not NONE. |
| 267 | "interpretedQuery": "A String", # The interpretation of the query used in search. For example, queries with |
| 268 | # natural language intent like "email from john" will be interpreted as |
| 269 | # "from:john source:mail". This field will not be filled when the reason is |
| 270 | # NOT_ENOUGH_RESULTS_FOUND_FOR_USER_QUERY. |
| 271 | "interpretationType": "A String", |
| 272 | }, |
| 273 | "results": [ # Results from a search query. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 274 | { # Results containing indexed information for a document. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 275 | "clusteredResults": [ # If source is clustered, provide list of clustered results. There will only |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 276 | # be one level of clustered results. If current source is not enabled for |
| 277 | # clustering, this field will be empty. |
| 278 | # Object with schema name: SearchResult |
| 279 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 280 | "url": "A String", # The URL of the search result. The URL contains a Google redirect to the |
| 281 | # actual item. This URL is signed and shouldn't be changed. |
| 282 | "metadata": { # Metadata of a matched search result. # Metadata of the search result. |
| 283 | "createTime": "A String", # The creation time for this document or object in the search result. |
| 284 | "updateTime": "A String", # The last modified date for the object in the search result. If not |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 285 | # set in the item, the value returned here is empty. When |
| 286 | # `updateTime` is used for calculating freshness and is not set, this |
| 287 | # value defaults to 2 years from the current time. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 288 | "owner": { # Object to represent a person. # Owner (usually creator) of the document or object of the search result. |
| 289 | "emailAddresses": [ # The person's email addresses |
| 290 | { # A person's email address. |
| 291 | "emailAddress": "A String", # The email address. |
| 292 | }, |
| 293 | ], |
| 294 | "personNames": [ # The person's name |
| 295 | { # A person's name. |
| 296 | "displayName": "A String", # The read-only display name formatted according to the locale specified by |
| 297 | # the viewer's account or the <code>Accept-Language</code> HTTP header. |
| 298 | }, |
| 299 | ], |
| 300 | "name": "A String", # The resource name of the person to provide information about. |
| 301 | # See <a href="https://developers.google.com/people/api/rest/v1/people/get"> |
| 302 | # People.get</a> from Google People API. |
| 303 | "obfuscatedId": "A String", # Obfuscated ID of a person. |
| 304 | "photos": [ # A person's read-only photo. A picture shown next to the person's name to |
| 305 | # help others recognize the person in search results. |
| 306 | { # A person's photo. |
| 307 | "url": "A String", # The URL of the photo. |
| 308 | }, |
| 309 | ], |
| 310 | }, |
| 311 | "fields": [ # Indexed fields in structured data, returned as a generic named property. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 312 | { # A typed name-value pair for structured data. The type of the value should |
| 313 | # be the same as the registered type for the `name` property in the object |
| 314 | # definition of `objectType`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 315 | "objectValues": { # List of object values. |
| 316 | "values": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 317 | # Object with schema name: StructuredDataObject |
| 318 | ], |
| 319 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 320 | "enumValues": { # List of enum values. |
| 321 | "values": [ # The maximum allowable length for string values is 32 characters. |
| 322 | "A String", |
| 323 | ], |
| 324 | }, |
| 325 | "dateValues": { # List of date values. |
| 326 | "values": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 327 | { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 328 | "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. |
| 329 | "year": 42, # Year of date. Must be from 1 to 9999. |
| 330 | "month": 42, # Month of date. Must be from 1 to 12. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 331 | }, |
| 332 | ], |
| 333 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 334 | "integerValues": { # List of integer values. |
| 335 | "values": [ |
| 336 | "A String", |
| 337 | ], |
| 338 | }, |
| 339 | "name": "A String", # The name of the property. This name should correspond to the name of the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 340 | # property that was registered for object definition in the schema. |
| 341 | # The maximum allowable length for this property is 256 characters. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 342 | "doubleValues": { # List of double values. |
| 343 | "values": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 344 | 3.14, |
| 345 | ], |
| 346 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 347 | "booleanValue": True or False, |
| 348 | "textValues": { # List of text values. |
| 349 | "values": [ # The maximum allowable length for text values is 2048 characters. |
| 350 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 351 | ], |
| 352 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 353 | "htmlValues": { # List of html values. |
| 354 | "values": [ # The maximum allowable length for html values is 2048 characters. |
| 355 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 356 | ], |
| 357 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 358 | "timestampValues": { # List of timestamp values. |
| 359 | "values": [ |
| 360 | "A String", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 361 | ], |
| 362 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 363 | }, |
| 364 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 365 | "objectType": "A String", # Object type of the search result. |
| 366 | "mimeType": "A String", # Mime type of the search result. |
| 367 | "displayOptions": { # Options that specify how to display a structured data search result. |
| 368 | "metalines": [ # The metalines content to be displayed with the result. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 369 | { # The collection of fields that make up a displayed line |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 370 | "fields": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 371 | { # Display Fields for Search Results |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 372 | "operatorName": "A String", # The operator name of the property. |
| 373 | "label": "A String", # The display label for the property. |
| 374 | "property": { # A typed name-value pair for structured data. The type of the value should # The name value pair for the property. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 375 | # be the same as the registered type for the `name` property in the object |
| 376 | # definition of `objectType`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 377 | "objectValues": { # List of object values. |
| 378 | "values": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 379 | # Object with schema name: StructuredDataObject |
| 380 | ], |
| 381 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 382 | "enumValues": { # List of enum values. |
| 383 | "values": [ # The maximum allowable length for string values is 32 characters. |
| 384 | "A String", |
| 385 | ], |
| 386 | }, |
| 387 | "dateValues": { # List of date values. |
| 388 | "values": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 389 | { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 390 | "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. |
| 391 | "year": 42, # Year of date. Must be from 1 to 9999. |
| 392 | "month": 42, # Month of date. Must be from 1 to 12. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 393 | }, |
| 394 | ], |
| 395 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 396 | "integerValues": { # List of integer values. |
| 397 | "values": [ |
| 398 | "A String", |
| 399 | ], |
| 400 | }, |
| 401 | "name": "A String", # The name of the property. This name should correspond to the name of the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 402 | # property that was registered for object definition in the schema. |
| 403 | # The maximum allowable length for this property is 256 characters. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 404 | "doubleValues": { # List of double values. |
| 405 | "values": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 406 | 3.14, |
| 407 | ], |
| 408 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 409 | "booleanValue": True or False, |
| 410 | "textValues": { # List of text values. |
| 411 | "values": [ # The maximum allowable length for text values is 2048 characters. |
| 412 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 413 | ], |
| 414 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 415 | "htmlValues": { # List of html values. |
| 416 | "values": [ # The maximum allowable length for html values is 2048 characters. |
| 417 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 418 | ], |
| 419 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 420 | "timestampValues": { # List of timestamp values. |
| 421 | "values": [ |
| 422 | "A String", |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 423 | ], |
| 424 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 425 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 426 | }, |
| 427 | ], |
| 428 | }, |
| 429 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 430 | "objectTypeLabel": "A String", # The display label for the object. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 431 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 432 | "source": { # Defines sources for the suggest/search APIs. # The named source for the result, such as Gmail. |
| 433 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 434 | "name": "A String", # Source name for content indexed by the |
| 435 | # Indexing API. |
| 436 | }, |
| 437 | }, |
| 438 | "snippet": { # Snippet of the search result, which summarizes the content of the resulting # The concatenation of all snippets (summaries) available for this result. |
| 439 | # page. |
| 440 | "snippet": "A String", # The snippet of the document. |
| 441 | # The snippet of the document. May contain escaped HTML character that |
| 442 | # should be unescaped prior to rendering. |
| 443 | "matchRanges": [ # The matched ranges in the snippet. |
| 444 | { # Matched range of a snippet [start, end). |
| 445 | "end": 42, # End of the match in the snippet. |
| 446 | "start": 42, # Starting position of the match in the snippet. |
| 447 | }, |
| 448 | ], |
| 449 | }, |
| 450 | "title": "A String", # Title of the search result. |
| 451 | "debugInfo": { # Debugging information about the result. # Debugging information about this search result. |
| 452 | "formattedDebugInfo": "A String", # General debug info formatted for display. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 453 | }, |
| 454 | }, |
| 455 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 456 | "debugInfo": { # Debugging information about the response. # Debugging information about the response. |
| 457 | "formattedDebugInfo": "A String", # General debug info formatted for display. |
| 458 | }, |
| 459 | "resultCountEstimate": "A String", # The estimated result count for this query. |
| 460 | "resultCounts": { # Result count information # Expanded result count information. |
| 461 | "sourceResultCounts": [ # Result count information for each source with results. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 462 | { # Per source result count information. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 463 | "resultCountExact": "A String", # The exact result count for this source. |
| 464 | "resultCountEstimate": "A String", # The estimated result count for this source. |
| 465 | "hasMoreResults": True or False, # Whether there are more search results for this source. |
| 466 | "source": { # Defines sources for the suggest/search APIs. # The source the result count information is associated with. |
| 467 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 468 | "name": "A String", # Source name for content indexed by the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 469 | # Indexing API. |
| 470 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 471 | }, |
| 472 | ], |
| 473 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 474 | "facetResults": [ # Repeated facet results. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 475 | { # Source specific facet response |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 476 | "objectType": "A String", # Object type for which facet results are returned. Can be empty. |
| 477 | "buckets": [ # FacetBuckets for values in response containing at least a single result. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 478 | { # A bucket in a facet is the basic unit of operation. A bucket can comprise |
| 479 | # either a single value OR a contiguous range of values, depending on the |
| 480 | # type of the field bucketed. |
| 481 | # FacetBucket is currently used only for returning the response object. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 482 | "value": { # Definition of a single value with generic type. |
| 483 | "integerValue": "A String", |
| 484 | "stringValue": "A String", |
| 485 | "dateValue": { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. |
| 486 | "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. |
| 487 | "year": 42, # Year of date. Must be from 1 to 9999. |
| 488 | "month": 42, # Month of date. Must be from 1 to 12. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 489 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 490 | "doubleValue": 3.14, |
| 491 | "timestampValue": "A String", |
| 492 | "booleanValue": True or False, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 493 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 494 | "count": 42, # Number of results that match the bucket value. Counts are only returned |
| 495 | # for searches when count accuracy is ensured. Can be empty. |
| 496 | "percentage": 42, # Percent of results that match the bucket value. The returned value is |
| 497 | # between (0-100], and is rounded down to an integer if fractional. If the |
| 498 | # value is not explicitly returned, it represents a percentage value that |
| 499 | # rounds to 0. Percentages are returned for all searches, but are an |
| 500 | # estimate. Because percentages are always returned, you should render |
| 501 | # percentages instead of counts. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 502 | }, |
| 503 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 504 | "sourceName": "A String", # Source name for which facet results are returned. Will not be empty. |
| 505 | "operatorName": "A String", # Name of the operator chosen for faceting. @see |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 506 | # cloudsearch.SchemaPropertyOptions |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 507 | }, |
| 508 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 509 | "structuredResults": [ # Structured results for the user query. These results are not counted |
| 510 | # against the page_size. |
| 511 | { # Structured results that are returned as part of search request. |
| 512 | "person": { # Object to represent a person. # Representation of a person |
| 513 | "emailAddresses": [ # The person's email addresses |
| 514 | { # A person's email address. |
| 515 | "emailAddress": "A String", # The email address. |
| 516 | }, |
| 517 | ], |
| 518 | "personNames": [ # The person's name |
| 519 | { # A person's name. |
| 520 | "displayName": "A String", # The read-only display name formatted according to the locale specified by |
| 521 | # the viewer's account or the <code>Accept-Language</code> HTTP header. |
| 522 | }, |
| 523 | ], |
| 524 | "name": "A String", # The resource name of the person to provide information about. |
| 525 | # See <a href="https://developers.google.com/people/api/rest/v1/people/get"> |
| 526 | # People.get</a> from Google People API. |
| 527 | "obfuscatedId": "A String", # Obfuscated ID of a person. |
| 528 | "photos": [ # A person's read-only photo. A picture shown next to the person's name to |
| 529 | # help others recognize the person in search results. |
| 530 | { # A person's photo. |
| 531 | "url": "A String", # The URL of the photo. |
| 532 | }, |
| 533 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 534 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 535 | }, |
| 536 | ], |
| 537 | "spellResults": [ # Suggested spelling for the query. |
| 538 | { |
| 539 | "suggestedQuery": "A String", # The suggested spelling of the query. |
| 540 | }, |
| 541 | ], |
| 542 | "resultCountExact": "A String", # The exact result count for this query. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 543 | }</pre> |
| 544 | </div> |
| 545 | |
| 546 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 547 | <code class="details" id="suggest">suggest(body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 548 | <pre>Provides suggestions for autocompleting the query. |
| 549 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 550 | **Note:** This API requires a standard end user account to execute. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 551 | A service account can't perform Query API requests directly; to use a |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 552 | service account to perform queries, set up [G Suite domain-wide delegation |
| 553 | of |
| 554 | authority](https://developers.google.com/cloud-search/docs/guides/delegation/). |
| 555 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 556 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 557 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 558 | The object takes the form of: |
| 559 | |
| 560 | { # Request of suggest API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 561 | "dataSourceRestrictions": [ # The sources to use for suggestions. If not specified, the data sources |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 562 | # are taken from the current search application. |
| 563 | # |
| 564 | # NOTE: Suggestions are supported only for third party data sources and |
| 565 | # people (i.e. PredefinedSource.PERSON). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 566 | { # Restriction on Datasource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 567 | "filterOptions": [ # Filter options restricting the results. If multiple filters |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 568 | # are present, they are grouped by object type before joining. |
| 569 | # Filters with the same object type are joined conjunctively, then |
| 570 | # the resulting expressions are joined disjunctively. |
| 571 | # |
| 572 | # The maximum number of elements is 20. |
| 573 | # |
| 574 | # NOTE: Suggest API supports only few filters at the moment: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 575 | # "objecttype", "type" and "mimetype". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 576 | # For now, schema specific filters cannot be used to filter suggestions. |
| 577 | { # Filter options to be applied on query. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 578 | "filter": { # A generic way of expressing filters in a query, which supports two # Generic filter to restrict the search, such as `lang:en`, `site:xyz`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 579 | # approaches: <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 580 | # **1. Setting a ValueFilter.** The name must match an operator_name defined in |
| 581 | # the schema for your data source. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 582 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 583 | # **2. Setting a CompositeFilter.** The filters are evaluated |
| 584 | # using the logical operator. The top-level operators can only be either an AND |
| 585 | # or a NOT. AND can appear only at the top-most level. OR can appear only under |
| 586 | # a top-level AND. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 587 | "valueFilter": { |
| 588 | "operatorName": "A String", # The `operator_name` applied to the query, such as *price_greater_than*. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 589 | # The filter can work against both types of filters defined in the schema |
| 590 | # for your data source: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 591 | # <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 592 | # 1. `operator_name`, where the query filters results by the property |
| 593 | # that matches the value. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 594 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 595 | # 2. `greater_than_operator_name` or `less_than_operator_name` in your |
| 596 | # schema. The query filters the results for the property values that are |
| 597 | # greater than or less than the supplied value in the query. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 598 | "value": { # Definition of a single value with generic type. # The value to be compared with. |
| 599 | "integerValue": "A String", |
| 600 | "stringValue": "A String", |
| 601 | "dateValue": { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. |
| 602 | "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. |
| 603 | "year": 42, # Year of date. Must be from 1 to 9999. |
| 604 | "month": 42, # Month of date. Must be from 1 to 12. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 605 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 606 | "doubleValue": 3.14, |
| 607 | "timestampValue": "A String", |
| 608 | "booleanValue": True or False, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 609 | }, |
| 610 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 611 | "compositeFilter": { |
| 612 | "logicOperator": "A String", # The logic operator of the sub filter. |
| 613 | "subFilters": [ # Sub filters. |
| 614 | # Object with schema name: Filter |
| 615 | ], |
| 616 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 617 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 618 | "objectType": "A String", # If object_type is set, only objects of that type are returned. This should |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 619 | # correspond to the name of the object that was registered within the |
| 620 | # definition of schema. The maximum length is 256 characters. |
| 621 | }, |
| 622 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 623 | "source": { # Defines sources for the suggest/search APIs. # The source of restriction. |
| 624 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 625 | "name": "A String", # Source name for content indexed by the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 626 | # Indexing API. |
| 627 | }, |
| 628 | }, |
| 629 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 630 | "query": "A String", # Partial query for which autocomplete suggestions will be shown. |
| 631 | # For example, if the query is "sea", then the server might return |
| 632 | # "season", "search", "seagull" and so on. |
| 633 | "requestOptions": { # Shared request options for all RPC methods. # Request options, such as the search application and user timezone. |
| 634 | "languageCode": "A String", # The BCP-47 language code, such as "en-US" or "sr-Latn". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 635 | # For more information, see |
| 636 | # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. |
| 637 | # For translations. |
| 638 | # |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 639 | # Set this field using the language set in browser or for the page. In the |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 640 | # event that the user's language preference is known, set this field to the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 641 | # known user language. |
| 642 | # |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 643 | # When specified, the documents in search results are biased towards the |
| 644 | # specified language. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 645 | # |
| 646 | # The suggest API does not use this parameter. Instead, suggest autocompletes |
| 647 | # only based on characters in the query. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 648 | "timeZone": "A String", # Current user's time zone id, such as "America/Los_Angeles" or |
| 649 | # "Australia/Sydney". These IDs are defined by |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 650 | # [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) |
| 651 | # project, and currently available in the file |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 652 | # [timezone.xml](http://unicode.org/repos/cldr/trunk/common/bcp47/timezone.xml). |
| 653 | # This field is used to correctly interpret date and time queries. |
| 654 | # If this field is not specified, the default time zone (UTC) is used. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 655 | "debugOptions": { # Shared request debug options for all cloudsearch RPC methods. # Debug options of the request |
| 656 | "enableDebugging": True or False, # If you are asked by Google to help with debugging, set this field. |
| 657 | # Otherwise, ignore this field. |
| 658 | }, |
| 659 | "searchApplicationId": "A String", # The ID generated when you create a search application using the |
| 660 | # [admin console](https://support.google.com/a/answer/9043922). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 661 | }, |
| 662 | } |
| 663 | |
| 664 | x__xgafv: string, V1 error format. |
| 665 | Allowed values |
| 666 | 1 - v1 error format |
| 667 | 2 - v2 error format |
| 668 | |
| 669 | Returns: |
| 670 | An object of the form: |
| 671 | |
| 672 | { # Response of the suggest API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 673 | "suggestResults": [ # List of suggestions. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 674 | { # One suggestion result. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 675 | "querySuggestion": { # This field does not contain anything as of now and is just used as an # This field will be present if the suggested query is a word/phrase |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 676 | # completion. |
| 677 | # indicator that the suggest result was a phrase completion. |
| 678 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 679 | "source": { # Defines sources for the suggest/search APIs. # The source of the suggestion. |
| 680 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 681 | "name": "A String", # Source name for content indexed by the |
| 682 | # Indexing API. |
| 683 | }, |
| 684 | "suggestedQuery": "A String", # The suggested query that will be used for search, when the user |
| 685 | # clicks on the suggestion |
| 686 | "peopleSuggestion": { # This field contains information about the person being suggested. # This is present when the suggestion indicates a person. It |
| 687 | # contains more information about the person - like their email ID, |
| 688 | # name etc. |
| 689 | "person": { # Object to represent a person. # Suggested person. All fields of the person object might not be populated. |
| 690 | "emailAddresses": [ # The person's email addresses |
| 691 | { # A person's email address. |
| 692 | "emailAddress": "A String", # The email address. |
| 693 | }, |
| 694 | ], |
| 695 | "personNames": [ # The person's name |
| 696 | { # A person's name. |
| 697 | "displayName": "A String", # The read-only display name formatted according to the locale specified by |
| 698 | # the viewer's account or the <code>Accept-Language</code> HTTP header. |
| 699 | }, |
| 700 | ], |
| 701 | "name": "A String", # The resource name of the person to provide information about. |
| 702 | # See <a href="https://developers.google.com/people/api/rest/v1/people/get"> |
| 703 | # People.get</a> from Google People API. |
| 704 | "obfuscatedId": "A String", # Obfuscated ID of a person. |
| 705 | "photos": [ # A person's read-only photo. A picture shown next to the person's name to |
| 706 | # help others recognize the person in search results. |
| 707 | { # A person's photo. |
| 708 | "url": "A String", # The URL of the photo. |
| 709 | }, |
| 710 | ], |
| 711 | }, |
| 712 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 713 | }, |
| 714 | ], |
| 715 | }</pre> |
| 716 | </div> |
| 717 | |
| 718 | </body></html> |