blob: 6654d788111ab463b0370a4f7865efe95349a149 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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'Mearadd494642020-05-01 07:42:23 -070083 <code><a href="#search">search(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084<p class="firstline">The Cloud Search Query API provides the search method, which returns</p>
85<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070086 <code><a href="#suggest">suggest(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087<p class="firstline">Provides suggestions for autocompleting the query.</p>
88<h3>Method Details</h3>
89<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code class="details" id="search">search(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091 <pre>The Cloud Search Query API provides the search method, which returns
92the most relevant results from a user query. The results can come from
93G Suite Apps, such as Gmail or Google Drive, or they can come from data
94that you have indexed from a third party.
95
Dan O'Mearadd494642020-05-01 07:42:23 -070096**Note:** This API requires a standard end user account to execute.
Bu Sun Kim65020912020-05-20 12:08:20 -070097A service account can&#x27;t perform Query API requests directly; to use a
Dan O'Mearadd494642020-05-01 07:42:23 -070098service account to perform queries, set up [G Suite domain-wide delegation
99of
100authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
101
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700103 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700104 The object takes the form of:
105
106{ # The search API request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700107 &quot;dataSourceRestrictions&quot;: [ # The sources to use for querying. If not specified, all data sources
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108 # from the current search application are used.
109 { # Restriction on Datasource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700110 &quot;filterOptions&quot;: [ # Filter options restricting the results. If multiple filters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111 # 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 Kim65020912020-05-20 12:08:20 -0700118 # &quot;objecttype&quot;, &quot;type&quot; and &quot;mimetype&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119 # For now, schema specific filters cannot be used to filter suggestions.
120 { # Filter options to be applied on query.
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &quot;filter&quot;: { # 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'Mearadd494642020-05-01 07:42:23 -0700122 # approaches: &lt;br/&gt;&lt;br/&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 # **1. Setting a ValueFilter.** The name must match an operator_name defined in
124 # the schema for your data source.
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 # &lt;br/&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126 # **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 Kim65020912020-05-20 12:08:20 -0700130 &quot;valueFilter&quot;: {
131 &quot;operatorName&quot;: &quot;A String&quot;, # The `operator_name` applied to the query, such as *price_greater_than*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700132 # The filter can work against both types of filters defined in the schema
133 # for your data source:
Dan O'Mearadd494642020-05-01 07:42:23 -0700134 # &lt;br/&gt;&lt;br/&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 # 1. `operator_name`, where the query filters results by the property
136 # that matches the value.
Dan O'Mearadd494642020-05-01 07:42:23 -0700137 # &lt;br/&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700138 # 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 Kim65020912020-05-20 12:08:20 -0700141 &quot;value&quot;: { # Definition of a single value with generic type. # The value to be compared with.
142 &quot;integerValue&quot;: &quot;A String&quot;,
143 &quot;stringValue&quot;: &quot;A String&quot;,
144 &quot;dateValue&quot;: { # 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 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month.
146 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999.
147 &quot;month&quot;: 42, # Month of date. Must be from 1 to 12.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700149 &quot;doubleValue&quot;: 3.14,
150 &quot;timestampValue&quot;: &quot;A String&quot;,
151 &quot;booleanValue&quot;: True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700152 },
153 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 &quot;compositeFilter&quot;: {
155 &quot;logicOperator&quot;: &quot;A String&quot;, # The logic operator of the sub filter.
156 &quot;subFilters&quot;: [ # Sub filters.
157 # Object with schema name: Filter
158 ],
159 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700161 &quot;objectType&quot;: &quot;A String&quot;, # If object_type is set, only objects of that type are returned. This should
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700162 # 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 Kim65020912020-05-20 12:08:20 -0700166 &quot;source&quot;: { # Defines sources for the suggest/search APIs. # The source of restriction.
167 &quot;predefinedSource&quot;: &quot;A String&quot;, # Predefined content source for Google Apps.
168 &quot;name&quot;: &quot;A String&quot;, # Source name for content indexed by the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700169 # Indexing API.
170 },
171 },
172 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700173 &quot;sortOptions&quot;: { # The options for sorting the search results
174 &quot;sortOrder&quot;: &quot;A String&quot;, # Ascending is the default sort order
175 &quot;operatorName&quot;: &quot;A String&quot;, # Name of the operator corresponding to the field to sort on.
176 # The corresponding property must be marked as
177 # sortable.
178 },
179 &quot;facetOptions&quot;: [
180 { # Specifies operators to return facet results for. There will be one
181 # FacetResult for every source_name/object_type/operator_name combination.
182 &quot;numFacetBuckets&quot;: 42, # Maximum number of facet buckets that should be returned for this facet.
183 # Defaults to 10.
184 # Maximum value is 100.
185 &quot;sourceName&quot;: &quot;A String&quot;, # Source name to facet on. Format: datasources/{source_id}
186 # If empty, all data sources will be used.
187 &quot;operatorName&quot;: &quot;A String&quot;, # Name of the operator chosen for faceting. @see
188 # cloudsearch.SchemaPropertyOptions
189 &quot;objectType&quot;: &quot;A String&quot;, # 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 &quot;pageSize&quot;: 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 &quot;query&quot;: &quot;A String&quot;, # The raw query string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700197 # See supported search operators in the [Cloud search
198 # Cheat
199 # Sheet](https://gsuite.google.com/learning-center/products/cloudsearch/cheat-sheet/)
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 &quot;start&quot;: 42, # Starting index of the results.
201 &quot;queryInterpretationOptions&quot;: { # Options to interpret user query. # Options to interpret the user query.
202 &quot;enableVerbatimMode&quot;: 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 &quot;disableNlInterpretation&quot;: 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 &quot;requestOptions&quot;: { # Shared request options for all RPC methods. # Request options, such as the search application and user timezone.
211 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;.
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&#x27;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 &quot;timeZone&quot;: &quot;A String&quot;, # Current user&#x27;s time zone id, such as &quot;America/Los_Angeles&quot; or
226 # &quot;Australia/Sydney&quot;. 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 &quot;debugOptions&quot;: { # Shared request debug options for all cloudsearch RPC methods. # Debug options of the request
233 &quot;enableDebugging&quot;: True or False, # If you are asked by Google to help with debugging, set this field.
234 # Otherwise, ignore this field.
235 },
236 &quot;searchApplicationId&quot;: &quot;A String&quot;, # The ID generated when you create a search application using the
237 # [admin console](https://support.google.com/a/answer/9043922).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700238 },
239 }
240
241 x__xgafv: string, V1 error format.
242 Allowed values
243 1 - v1 error format
244 2 - v2 error format
245
246Returns:
247 An object of the form:
248
249 { # The search API response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &quot;errorInfo&quot;: { # Error information about the response. # Error information about the response.
251 &quot;errorMessages&quot;: [
252 { # Error message per source response.
253 &quot;errorMessage&quot;: &quot;A String&quot;,
254 &quot;source&quot;: { # Defines sources for the suggest/search APIs.
255 &quot;predefinedSource&quot;: &quot;A String&quot;, # Predefined content source for Google Apps.
256 &quot;name&quot;: &quot;A String&quot;, # Source name for content indexed by the
257 # Indexing API.
258 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700261 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 &quot;hasMoreResults&quot;: True or False, # Whether there are more search results matching the query.
263 &quot;queryInterpretation&quot;: { # Query interpretation result for user query. Empty if query interpretation
264 # is disabled.
265 &quot;reason&quot;: &quot;A String&quot;, # The reason for interpretation of the query. This field will not be
266 # UNSPECIFIED if the interpretation type is not NONE.
267 &quot;interpretedQuery&quot;: &quot;A String&quot;, # The interpretation of the query used in search. For example, queries with
268 # natural language intent like &quot;email from john&quot; will be interpreted as
269 # &quot;from:john source:mail&quot;. This field will not be filled when the reason is
270 # NOT_ENOUGH_RESULTS_FOUND_FOR_USER_QUERY.
271 &quot;interpretationType&quot;: &quot;A String&quot;,
272 },
273 &quot;results&quot;: [ # Results from a search query.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700274 { # Results containing indexed information for a document.
Bu Sun Kim65020912020-05-20 12:08:20 -0700275 &quot;clusteredResults&quot;: [ # If source is clustered, provide list of clustered results. There will only
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700276 # 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 Kim65020912020-05-20 12:08:20 -0700280 &quot;url&quot;: &quot;A String&quot;, # The URL of the search result. The URL contains a Google redirect to the
281 # actual item. This URL is signed and shouldn&#x27;t be changed.
282 &quot;metadata&quot;: { # Metadata of a matched search result. # Metadata of the search result.
283 &quot;createTime&quot;: &quot;A String&quot;, # The creation time for this document or object in the search result.
284 &quot;updateTime&quot;: &quot;A String&quot;, # The last modified date for the object in the search result. If not
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700285 # 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 Kim65020912020-05-20 12:08:20 -0700288 &quot;owner&quot;: { # Object to represent a person. # Owner (usually creator) of the document or object of the search result.
289 &quot;emailAddresses&quot;: [ # The person&#x27;s email addresses
290 { # A person&#x27;s email address.
291 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address.
292 },
293 ],
294 &quot;personNames&quot;: [ # The person&#x27;s name
295 { # A person&#x27;s name.
296 &quot;displayName&quot;: &quot;A String&quot;, # The read-only display name formatted according to the locale specified by
297 # the viewer&#x27;s account or the &lt;code&gt;Accept-Language&lt;/code&gt; HTTP header.
298 },
299 ],
300 &quot;name&quot;: &quot;A String&quot;, # The resource name of the person to provide information about.
301 # See &lt;a href=&quot;https://developers.google.com/people/api/rest/v1/people/get&quot;&gt;
302 # People.get&lt;/a&gt; from Google People API.
303 &quot;obfuscatedId&quot;: &quot;A String&quot;, # Obfuscated ID of a person.
304 &quot;photos&quot;: [ # A person&#x27;s read-only photo. A picture shown next to the person&#x27;s name to
305 # help others recognize the person in search results.
306 { # A person&#x27;s photo.
307 &quot;url&quot;: &quot;A String&quot;, # The URL of the photo.
308 },
309 ],
310 },
311 &quot;fields&quot;: [ # Indexed fields in structured data, returned as a generic named property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312 { # 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 Kim65020912020-05-20 12:08:20 -0700315 &quot;objectValues&quot;: { # List of object values.
316 &quot;values&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700317 # Object with schema name: StructuredDataObject
318 ],
319 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700320 &quot;enumValues&quot;: { # List of enum values.
321 &quot;values&quot;: [ # The maximum allowable length for string values is 32 characters.
322 &quot;A String&quot;,
323 ],
324 },
325 &quot;dateValues&quot;: { # List of date values.
326 &quot;values&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 { # 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 Kim65020912020-05-20 12:08:20 -0700328 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month.
329 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999.
330 &quot;month&quot;: 42, # Month of date. Must be from 1 to 12.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700331 },
332 ],
333 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700334 &quot;integerValues&quot;: { # List of integer values.
335 &quot;values&quot;: [
336 &quot;A String&quot;,
337 ],
338 },
339 &quot;name&quot;: &quot;A String&quot;, # The name of the property. This name should correspond to the name of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700340 # property that was registered for object definition in the schema.
341 # The maximum allowable length for this property is 256 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700342 &quot;doubleValues&quot;: { # List of double values.
343 &quot;values&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700344 3.14,
345 ],
346 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700347 &quot;booleanValue&quot;: True or False,
348 &quot;textValues&quot;: { # List of text values.
349 &quot;values&quot;: [ # The maximum allowable length for text values is 2048 characters.
350 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700351 ],
352 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700353 &quot;htmlValues&quot;: { # List of html values.
354 &quot;values&quot;: [ # The maximum allowable length for html values is 2048 characters.
355 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700356 ],
357 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 &quot;timestampValues&quot;: { # List of timestamp values.
359 &quot;values&quot;: [
360 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700361 ],
362 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 },
364 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 &quot;objectType&quot;: &quot;A String&quot;, # Object type of the search result.
366 &quot;mimeType&quot;: &quot;A String&quot;, # Mime type of the search result.
367 &quot;displayOptions&quot;: { # Options that specify how to display a structured data search result.
368 &quot;metalines&quot;: [ # The metalines content to be displayed with the result.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700369 { # The collection of fields that make up a displayed line
Bu Sun Kim65020912020-05-20 12:08:20 -0700370 &quot;fields&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700371 { # Display Fields for Search Results
Bu Sun Kim65020912020-05-20 12:08:20 -0700372 &quot;operatorName&quot;: &quot;A String&quot;, # The operator name of the property.
373 &quot;label&quot;: &quot;A String&quot;, # The display label for the property.
374 &quot;property&quot;: { # A typed name-value pair for structured data. The type of the value should # The name value pair for the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700375 # be the same as the registered type for the `name` property in the object
376 # definition of `objectType`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 &quot;objectValues&quot;: { # List of object values.
378 &quot;values&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700379 # Object with schema name: StructuredDataObject
380 ],
381 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700382 &quot;enumValues&quot;: { # List of enum values.
383 &quot;values&quot;: [ # The maximum allowable length for string values is 32 characters.
384 &quot;A String&quot;,
385 ],
386 },
387 &quot;dateValues&quot;: { # List of date values.
388 &quot;values&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700389 { # 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 Kim65020912020-05-20 12:08:20 -0700390 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month.
391 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999.
392 &quot;month&quot;: 42, # Month of date. Must be from 1 to 12.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700393 },
394 ],
395 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700396 &quot;integerValues&quot;: { # List of integer values.
397 &quot;values&quot;: [
398 &quot;A String&quot;,
399 ],
400 },
401 &quot;name&quot;: &quot;A String&quot;, # The name of the property. This name should correspond to the name of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700402 # property that was registered for object definition in the schema.
403 # The maximum allowable length for this property is 256 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700404 &quot;doubleValues&quot;: { # List of double values.
405 &quot;values&quot;: [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700406 3.14,
407 ],
408 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 &quot;booleanValue&quot;: True or False,
410 &quot;textValues&quot;: { # List of text values.
411 &quot;values&quot;: [ # The maximum allowable length for text values is 2048 characters.
412 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700413 ],
414 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700415 &quot;htmlValues&quot;: { # List of html values.
416 &quot;values&quot;: [ # The maximum allowable length for html values is 2048 characters.
417 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418 ],
419 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700420 &quot;timestampValues&quot;: { # List of timestamp values.
421 &quot;values&quot;: [
422 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700423 ],
424 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700426 },
427 ],
428 },
429 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 &quot;objectTypeLabel&quot;: &quot;A String&quot;, # The display label for the object.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700431 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700432 &quot;source&quot;: { # Defines sources for the suggest/search APIs. # The named source for the result, such as Gmail.
433 &quot;predefinedSource&quot;: &quot;A String&quot;, # Predefined content source for Google Apps.
434 &quot;name&quot;: &quot;A String&quot;, # Source name for content indexed by the
435 # Indexing API.
436 },
437 },
438 &quot;snippet&quot;: { # 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 &quot;snippet&quot;: &quot;A String&quot;, # 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 &quot;matchRanges&quot;: [ # The matched ranges in the snippet.
444 { # Matched range of a snippet [start, end).
445 &quot;end&quot;: 42, # End of the match in the snippet.
446 &quot;start&quot;: 42, # Starting position of the match in the snippet.
447 },
448 ],
449 },
450 &quot;title&quot;: &quot;A String&quot;, # Title of the search result.
451 &quot;debugInfo&quot;: { # Debugging information about the result. # Debugging information about this search result.
452 &quot;formattedDebugInfo&quot;: &quot;A String&quot;, # General debug info formatted for display.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700453 },
454 },
455 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700456 &quot;debugInfo&quot;: { # Debugging information about the response. # Debugging information about the response.
457 &quot;formattedDebugInfo&quot;: &quot;A String&quot;, # General debug info formatted for display.
458 },
459 &quot;resultCountEstimate&quot;: &quot;A String&quot;, # The estimated result count for this query.
460 &quot;resultCounts&quot;: { # Result count information # Expanded result count information.
461 &quot;sourceResultCounts&quot;: [ # Result count information for each source with results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 { # Per source result count information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700463 &quot;resultCountExact&quot;: &quot;A String&quot;, # The exact result count for this source.
464 &quot;resultCountEstimate&quot;: &quot;A String&quot;, # The estimated result count for this source.
465 &quot;hasMoreResults&quot;: True or False, # Whether there are more search results for this source.
466 &quot;source&quot;: { # Defines sources for the suggest/search APIs. # The source the result count information is associated with.
467 &quot;predefinedSource&quot;: &quot;A String&quot;, # Predefined content source for Google Apps.
468 &quot;name&quot;: &quot;A String&quot;, # Source name for content indexed by the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700469 # Indexing API.
470 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700471 },
472 ],
473 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700474 &quot;facetResults&quot;: [ # Repeated facet results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700475 { # Source specific facet response
Bu Sun Kim65020912020-05-20 12:08:20 -0700476 &quot;objectType&quot;: &quot;A String&quot;, # Object type for which facet results are returned. Can be empty.
477 &quot;buckets&quot;: [ # FacetBuckets for values in response containing at least a single result.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700478 { # 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 Kim65020912020-05-20 12:08:20 -0700482 &quot;value&quot;: { # Definition of a single value with generic type.
483 &quot;integerValue&quot;: &quot;A String&quot;,
484 &quot;stringValue&quot;: &quot;A String&quot;,
485 &quot;dateValue&quot;: { # 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 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month.
487 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999.
488 &quot;month&quot;: 42, # Month of date. Must be from 1 to 12.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700489 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700490 &quot;doubleValue&quot;: 3.14,
491 &quot;timestampValue&quot;: &quot;A String&quot;,
492 &quot;booleanValue&quot;: True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700493 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700494 &quot;count&quot;: 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 &quot;percentage&quot;: 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 Kim715bd7f2019-06-14 16:50:42 -0700502 },
503 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700504 &quot;sourceName&quot;: &quot;A String&quot;, # Source name for which facet results are returned. Will not be empty.
505 &quot;operatorName&quot;: &quot;A String&quot;, # Name of the operator chosen for faceting. @see
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700506 # cloudsearch.SchemaPropertyOptions
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507 },
508 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 &quot;structuredResults&quot;: [ # 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 &quot;person&quot;: { # Object to represent a person. # Representation of a person
513 &quot;emailAddresses&quot;: [ # The person&#x27;s email addresses
514 { # A person&#x27;s email address.
515 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address.
516 },
517 ],
518 &quot;personNames&quot;: [ # The person&#x27;s name
519 { # A person&#x27;s name.
520 &quot;displayName&quot;: &quot;A String&quot;, # The read-only display name formatted according to the locale specified by
521 # the viewer&#x27;s account or the &lt;code&gt;Accept-Language&lt;/code&gt; HTTP header.
522 },
523 ],
524 &quot;name&quot;: &quot;A String&quot;, # The resource name of the person to provide information about.
525 # See &lt;a href=&quot;https://developers.google.com/people/api/rest/v1/people/get&quot;&gt;
526 # People.get&lt;/a&gt; from Google People API.
527 &quot;obfuscatedId&quot;: &quot;A String&quot;, # Obfuscated ID of a person.
528 &quot;photos&quot;: [ # A person&#x27;s read-only photo. A picture shown next to the person&#x27;s name to
529 # help others recognize the person in search results.
530 { # A person&#x27;s photo.
531 &quot;url&quot;: &quot;A String&quot;, # The URL of the photo.
532 },
533 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700535 },
536 ],
537 &quot;spellResults&quot;: [ # Suggested spelling for the query.
538 {
539 &quot;suggestedQuery&quot;: &quot;A String&quot;, # The suggested spelling of the query.
540 },
541 ],
542 &quot;resultCountExact&quot;: &quot;A String&quot;, # The exact result count for this query.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700543 }</pre>
544</div>
545
546<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700547 <code class="details" id="suggest">suggest(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700548 <pre>Provides suggestions for autocompleting the query.
549
Dan O'Mearadd494642020-05-01 07:42:23 -0700550**Note:** This API requires a standard end user account to execute.
Bu Sun Kim65020912020-05-20 12:08:20 -0700551A service account can&#x27;t perform Query API requests directly; to use a
Dan O'Mearadd494642020-05-01 07:42:23 -0700552service account to perform queries, set up [G Suite domain-wide delegation
553of
554authority](https://developers.google.com/cloud-search/docs/guides/delegation/).
555
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700556Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700557 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700558 The object takes the form of:
559
560{ # Request of suggest API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700561 &quot;dataSourceRestrictions&quot;: [ # The sources to use for suggestions. If not specified, the data sources
Dan O'Mearadd494642020-05-01 07:42:23 -0700562 # 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 Kim715bd7f2019-06-14 16:50:42 -0700566 { # Restriction on Datasource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700567 &quot;filterOptions&quot;: [ # Filter options restricting the results. If multiple filters
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700568 # 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 Kim65020912020-05-20 12:08:20 -0700575 # &quot;objecttype&quot;, &quot;type&quot; and &quot;mimetype&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576 # For now, schema specific filters cannot be used to filter suggestions.
577 { # Filter options to be applied on query.
Bu Sun Kim65020912020-05-20 12:08:20 -0700578 &quot;filter&quot;: { # 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'Mearadd494642020-05-01 07:42:23 -0700579 # approaches: &lt;br/&gt;&lt;br/&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700580 # **1. Setting a ValueFilter.** The name must match an operator_name defined in
581 # the schema for your data source.
Dan O'Mearadd494642020-05-01 07:42:23 -0700582 # &lt;br/&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 # **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 Kim65020912020-05-20 12:08:20 -0700587 &quot;valueFilter&quot;: {
588 &quot;operatorName&quot;: &quot;A String&quot;, # The `operator_name` applied to the query, such as *price_greater_than*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700589 # The filter can work against both types of filters defined in the schema
590 # for your data source:
Dan O'Mearadd494642020-05-01 07:42:23 -0700591 # &lt;br/&gt;&lt;br/&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592 # 1. `operator_name`, where the query filters results by the property
593 # that matches the value.
Dan O'Mearadd494642020-05-01 07:42:23 -0700594 # &lt;br/&gt;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700595 # 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 Kim65020912020-05-20 12:08:20 -0700598 &quot;value&quot;: { # Definition of a single value with generic type. # The value to be compared with.
599 &quot;integerValue&quot;: &quot;A String&quot;,
600 &quot;stringValue&quot;: &quot;A String&quot;,
601 &quot;dateValue&quot;: { # 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 &quot;day&quot;: 42, # Day of month. Must be from 1 to 31 and valid for the year and month.
603 &quot;year&quot;: 42, # Year of date. Must be from 1 to 9999.
604 &quot;month&quot;: 42, # Month of date. Must be from 1 to 12.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700605 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700606 &quot;doubleValue&quot;: 3.14,
607 &quot;timestampValue&quot;: &quot;A String&quot;,
608 &quot;booleanValue&quot;: True or False,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 },
610 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700611 &quot;compositeFilter&quot;: {
612 &quot;logicOperator&quot;: &quot;A String&quot;, # The logic operator of the sub filter.
613 &quot;subFilters&quot;: [ # Sub filters.
614 # Object with schema name: Filter
615 ],
616 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700617 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700618 &quot;objectType&quot;: &quot;A String&quot;, # If object_type is set, only objects of that type are returned. This should
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700619 # 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 Kim65020912020-05-20 12:08:20 -0700623 &quot;source&quot;: { # Defines sources for the suggest/search APIs. # The source of restriction.
624 &quot;predefinedSource&quot;: &quot;A String&quot;, # Predefined content source for Google Apps.
625 &quot;name&quot;: &quot;A String&quot;, # Source name for content indexed by the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700626 # Indexing API.
627 },
628 },
629 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 &quot;query&quot;: &quot;A String&quot;, # Partial query for which autocomplete suggestions will be shown.
631 # For example, if the query is &quot;sea&quot;, then the server might return
632 # &quot;season&quot;, &quot;search&quot;, &quot;seagull&quot; and so on.
633 &quot;requestOptions&quot;: { # Shared request options for all RPC methods. # Request options, such as the search application and user timezone.
634 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635 # For more information, see
636 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
637 # For translations.
638 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700639 # Set this field using the language set in browser or for the page. In the
Bu Sun Kim65020912020-05-20 12:08:20 -0700640 # event that the user&#x27;s language preference is known, set this field to the
Dan O'Mearadd494642020-05-01 07:42:23 -0700641 # known user language.
642 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700643 # When specified, the documents in search results are biased towards the
644 # specified language.
Dan O'Mearadd494642020-05-01 07:42:23 -0700645 #
646 # The suggest API does not use this parameter. Instead, suggest autocompletes
647 # only based on characters in the query.
Bu Sun Kim65020912020-05-20 12:08:20 -0700648 &quot;timeZone&quot;: &quot;A String&quot;, # Current user&#x27;s time zone id, such as &quot;America/Los_Angeles&quot; or
649 # &quot;Australia/Sydney&quot;. These IDs are defined by
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700650 # [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/)
651 # project, and currently available in the file
Dan O'Mearadd494642020-05-01 07:42:23 -0700652 # [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 Kim65020912020-05-20 12:08:20 -0700655 &quot;debugOptions&quot;: { # Shared request debug options for all cloudsearch RPC methods. # Debug options of the request
656 &quot;enableDebugging&quot;: True or False, # If you are asked by Google to help with debugging, set this field.
657 # Otherwise, ignore this field.
658 },
659 &quot;searchApplicationId&quot;: &quot;A String&quot;, # The ID generated when you create a search application using the
660 # [admin console](https://support.google.com/a/answer/9043922).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700661 },
662 }
663
664 x__xgafv: string, V1 error format.
665 Allowed values
666 1 - v1 error format
667 2 - v2 error format
668
669Returns:
670 An object of the form:
671
672 { # Response of the suggest API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700673 &quot;suggestResults&quot;: [ # List of suggestions.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 { # One suggestion result.
Bu Sun Kim65020912020-05-20 12:08:20 -0700675 &quot;querySuggestion&quot;: { # 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 Kim715bd7f2019-06-14 16:50:42 -0700676 # completion.
677 # indicator that the suggest result was a phrase completion.
678 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700679 &quot;source&quot;: { # Defines sources for the suggest/search APIs. # The source of the suggestion.
680 &quot;predefinedSource&quot;: &quot;A String&quot;, # Predefined content source for Google Apps.
681 &quot;name&quot;: &quot;A String&quot;, # Source name for content indexed by the
682 # Indexing API.
683 },
684 &quot;suggestedQuery&quot;: &quot;A String&quot;, # The suggested query that will be used for search, when the user
685 # clicks on the suggestion
686 &quot;peopleSuggestion&quot;: { # 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 &quot;person&quot;: { # Object to represent a person. # Suggested person. All fields of the person object might not be populated.
690 &quot;emailAddresses&quot;: [ # The person&#x27;s email addresses
691 { # A person&#x27;s email address.
692 &quot;emailAddress&quot;: &quot;A String&quot;, # The email address.
693 },
694 ],
695 &quot;personNames&quot;: [ # The person&#x27;s name
696 { # A person&#x27;s name.
697 &quot;displayName&quot;: &quot;A String&quot;, # The read-only display name formatted according to the locale specified by
698 # the viewer&#x27;s account or the &lt;code&gt;Accept-Language&lt;/code&gt; HTTP header.
699 },
700 ],
701 &quot;name&quot;: &quot;A String&quot;, # The resource name of the person to provide information about.
702 # See &lt;a href=&quot;https://developers.google.com/people/api/rest/v1/people/get&quot;&gt;
703 # People.get&lt;/a&gt; from Google People API.
704 &quot;obfuscatedId&quot;: &quot;A String&quot;, # Obfuscated ID of a person.
705 &quot;photos&quot;: [ # A person&#x27;s read-only photo. A picture shown next to the person&#x27;s name to
706 # help others recognize the person in search results.
707 { # A person&#x27;s photo.
708 &quot;url&quot;: &quot;A String&quot;, # The URL of the photo.
709 },
710 ],
711 },
712 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 },
714 ],
715 }</pre>
716</div>
717
718</body></html>