blob: 845199e42daa48a5296b431afe298045ef430642 [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.indexing.html">indexing</a> . <a href="cloudsearch_v1.indexing.datasources.html">datasources</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="cloudsearch_v1.indexing.datasources.items.html">items()</a></code>
79</p>
80<p class="firstline">Returns the items Resource.</p>
81
82<p class="toc_element">
83 <code><a href="#deleteSchema">deleteSchema(name, debugOptions_enableDebugging=None, x__xgafv=None)</a></code></p>
84<p class="firstline">Deletes the schema of a data source.</p>
85<p class="toc_element">
86 <code><a href="#getSchema">getSchema(name, debugOptions_enableDebugging=None, x__xgafv=None)</a></code></p>
87<p class="firstline">Gets the schema of a data source.</p>
88<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070089 <code><a href="#updateSchema">updateSchema(name, body=None, x__xgafv=None)</a></code></p>
90<p class="firstline">Updates the schema of a data source. This method does not perform</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<h3>Method Details</h3>
92<div class="method">
93 <code class="details" id="deleteSchema">deleteSchema(name, debugOptions_enableDebugging=None, x__xgafv=None)</code>
94 <pre>Deletes the schema of a data source.
95
Dan O'Mearadd494642020-05-01 07:42:23 -070096**Note:** This API requires an admin or service account to execute.
97
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098Args:
99 name: string, Name of the data source to delete Schema. Format:
100datasources/{source_id} (required)
101 debugOptions_enableDebugging: boolean, If you are asked by Google to help with debugging, set this field.
102Otherwise, ignore this field.
103 x__xgafv: string, V1 error format.
104 Allowed values
105 1 - v1 error format
106 2 - v2 error format
107
108Returns:
109 An object of the form:
110
111 { # This resource represents a long-running operation that is the result of a
112 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -0700113 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 # method returns no data on success, such as `Delete`, the response is
115 # `google.protobuf.Empty`. If the original method is standard
116 # `Get`/`Create`/`Update`, the response should be the resource. For other
117 # methods, the response should have the type `XxxResponse`, where `Xxx`
118 # is the original method name. For example, if the original method name
119 # is `TakeSnapshot()`, the inferred response type is
120 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -0700122 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700123 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
124 # contains progress information and common metadata such as create time.
125 # Some services might not provide such metadata. Any method that returns a
126 # long-running operation should document the metadata type, if any.
127 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
128 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700129 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700130 # different programming environments, including REST APIs and RPC APIs. It is
131 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
132 # three pieces of data: error code, error message, and error details.
133 #
134 # You can find out more about this error model and how to work with it in the
135 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700137 # message types for APIs to use.
138 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700140 },
141 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700142 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
143 # user-facing error message should be localized and sent in the
144 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700145 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700147 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
148 # originally returns it. If you use the default HTTP mapping, the
149 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700150 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
151 # If `true`, the operation is completed, and either `error` or `response` is
152 # available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 }</pre>
154</div>
155
156<div class="method">
157 <code class="details" id="getSchema">getSchema(name, debugOptions_enableDebugging=None, x__xgafv=None)</code>
158 <pre>Gets the schema of a data source.
159
Dan O'Mearadd494642020-05-01 07:42:23 -0700160**Note:** This API requires an admin or service account to execute.
161
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700162Args:
163 name: string, Name of the data source to get Schema. Format:
164datasources/{source_id} (required)
165 debugOptions_enableDebugging: boolean, If you are asked by Google to help with debugging, set this field.
166Otherwise, ignore this field.
167 x__xgafv: string, V1 error format.
168 Allowed values
169 1 - v1 error format
170 2 - v2 error format
171
172Returns:
173 An object of the form:
174
175 { # The schema definition for a data source.
Bu Sun Kim65020912020-05-20 12:08:20 -0700176 &quot;operationIds&quot;: [ # IDs of the Long Running Operations (LROs) currently running for this
177 # schema. After modifying the schema, wait for operations to complete
178 # before indexing additional content.
179 &quot;A String&quot;,
180 ],
181 &quot;objectDefinitions&quot;: [ # The list of top-level objects for the data source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 # The maximum number of elements is 10.
183 { # The definition for an object within a data source.
Bu Sun Kim65020912020-05-20 12:08:20 -0700184 &quot;propertyDefinitions&quot;: [ # The property definitions for the object.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700185 # The maximum number of elements is 1000.
186 { # The definition of a property within an object.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700187 &quot;isRepeatable&quot;: True or False, # Indicates that multiple values are allowed for the property. For example, a
188 # document only has one description but can have multiple comments. Cannot be
189 # true for properties whose type is a boolean.
190 # If set to false, properties that contain more than one value cause the
191 # indexing request for that item to be rejected.
192 &quot;htmlPropertyOptions&quot;: { # Options for html properties.
193 &quot;operatorOptions&quot;: { # Used to provide a search operator for html properties. This is optional. # If set, describes how the property should be used as a search operator.
194 # Search operators let users restrict the query to specific fields relevant
195 # to the type of item being searched.
196 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
197 # html property. For example, if operatorName is *subject* and the
198 # property&#x27;s name is *subjectLine*, then queries like
199 # *subject:&amp;lt;value&amp;gt;* show results only where the value of the
200 # property named *subjectLine* matches *&amp;lt;value&amp;gt;*. By contrast, a
201 # search that uses the same *&amp;lt;value&amp;gt;* without an operator return
202 # all items where *&amp;lt;value&amp;gt;* matches the value of any
203 # html properties or text within the content field for the item.
204 # The operator name can only contain lowercase letters (a-z).
205 # The maximum length is 32 characters.
206 },
207 &quot;retrievalImportance&quot;: { # Indicates the search quality importance of the tokens within the
208 # field when used for retrieval. Can only be set to DEFAULT or NONE.
209 &quot;importance&quot;: &quot;A String&quot;, # Indicates the ranking importance given to property when it is matched
210 # during retrieval. Once set, the token importance of a property cannot be
211 # changed.
212 },
213 },
214 &quot;isReturnable&quot;: True or False, # Indicates that the property identifies data that should be returned in
215 # search results via the Query API. If set to *true*, indicates that Query
216 # API users can use matching property fields in results. However, storing
217 # fields requires more space allocation and uses more bandwidth for search
218 # queries, which impacts performance over large datasets. Set to *true* here
219 # only if the field is needed for search results. Cannot be true for
220 # properties whose type is an object.
Bu Sun Kim65020912020-05-20 12:08:20 -0700221 &quot;textPropertyOptions&quot;: { # Options for text properties.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700222 &quot;retrievalImportance&quot;: { # Indicates the search quality importance of the tokens within the
223 # field when used for retrieval.
224 &quot;importance&quot;: &quot;A String&quot;, # Indicates the ranking importance given to property when it is matched
225 # during retrieval. Once set, the token importance of a property cannot be
226 # changed.
227 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700228 &quot;operatorOptions&quot;: { # Used to provide a search operator for text properties. This is optional. # If set, describes how the property should be used as a search operator.
229 # Search operators let users restrict the query to specific fields relevant
230 # to the type of item being searched.
231 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
232 # text property. For example, if operatorName is *subject* and the
233 # property&#x27;s name is *subjectLine*, then queries like
234 # *subject:&amp;lt;value&amp;gt;* show results only where the value of the
235 # property named *subjectLine* matches *&amp;lt;value&amp;gt;*. By contrast, a
236 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
237 # all items where *&amp;lt;value&amp;gt;* matches the value of any
238 # text properties or text within the content field for the item.
239 # The operator name can only contain lowercase letters (a-z).
240 # The maximum length is 32 characters.
241 &quot;exactMatchWithOperator&quot;: True or False, # If true, the text value is tokenized as one atomic value in
242 # operator searches and facet matches. For example, if the operator name is
243 # &quot;genre&quot; and the value is &quot;science-fiction&quot; the query restrictions
244 # &quot;genre:science&quot; and &quot;genre:fiction&quot; doesn&#x27;t match the item;
245 # &quot;genre:science-fiction&quot; does. Value matching is case-sensitive
246 # and does not remove special characters.
247 # If false, the text is tokenized. For example, if the value is
248 # &quot;science-fiction&quot; the queries &quot;genre:science&quot; and &quot;genre:fiction&quot;
249 # matches the item.
250 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700251 },
252 &quot;displayOptions&quot;: { # The display options for a property. # Options that determine how the property is displayed in the Cloud Search
253 # results page if it is specified to be displayed in the object&#x27;s
254 # display options
255 # .
256 &quot;displayLabel&quot;: &quot;A String&quot;, # The user friendly label for the property that is used if the property
257 # is specified to be displayed in ObjectDisplayOptions. If provided, the
258 # display label is shown in front of the property values when the property is
259 # part of the object display options. For example, if the property value is
260 # &#x27;1&#x27;, the value by itself may not be useful context for the user. If the
261 # display name given was &#x27;priority&#x27;, then the user sees &#x27;priority : 1&#x27; in
262 # the search results which provides clear context to search users. This is
263 # OPTIONAL; if not given, only the property values are displayed.
264 # The maximum length is 64 characters.
265 },
266 &quot;timestampPropertyOptions&quot;: { # Options for timestamp properties.
267 &quot;operatorOptions&quot;: { # Used to provide a search operator for timestamp properties. This is # If set, describes how the timestamp should be used as a search operator.
268 # optional. Search operators let users restrict the query to specific fields
269 # relevant to the type of item being searched.
270 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
271 # timestamp property. For example, if operatorName is *closedon* and the
272 # property&#x27;s name is *closeDate*, then queries like
273 # *closedon:&amp;lt;value&amp;gt;* show results only where the value of the
274 # property named *closeDate* matches *&amp;lt;value&amp;gt;*. By contrast, a
275 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
276 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
277 # properties or text within the content field for the item. The operator
278 # name can only contain lowercase letters (a-z). The maximum length is 32
279 # characters.
280 &quot;lessThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
281 # timestamp property using the less-than operator. For example, if
282 # lessThanOperatorName is *closedbefore* and the property&#x27;s name is
283 # *closeDate*, then queries like *closedbefore:&amp;lt;value&amp;gt;*
284 # show results only where the value of the property named *closeDate* is
285 # earlier than *&amp;lt;value&amp;gt;*.
286 # The operator name can only contain lowercase letters (a-z).
287 # The maximum length is 32 characters.
288 &quot;greaterThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
289 # timestamp property using the greater-than operator. For example, if
290 # greaterThanOperatorName is *closedafter* and the property&#x27;s name is
291 # *closeDate*, then queries like *closedafter:&amp;lt;value&amp;gt;*
292 # show results only where the value of the property named *closeDate* is
293 # later than *&amp;lt;value&amp;gt;*.
294 # The operator name can only contain lowercase letters (a-z).
295 # The maximum length is 32 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700296 },
297 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700298 &quot;isSuggestable&quot;: True or False, # Indicates that the property can be used for generating query suggestions.
Bu Sun Kim65020912020-05-20 12:08:20 -0700299 &quot;objectPropertyOptions&quot;: { # Options for object properties.
300 &quot;subobjectProperties&quot;: [ # The properties of the sub-object. These properties represent a nested
Dan O'Mearadd494642020-05-01 07:42:23 -0700301 # object. For example, if this property represents a postal address, the
302 # subobjectProperties might be named *street*, *city*, and *state*.
303 # The maximum number of elements is 1000.
304 # Object with schema name: PropertyDefinition
305 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700306 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700307 &quot;booleanPropertyOptions&quot;: { # Options for boolean properties.
308 &quot;operatorOptions&quot;: { # Used to provide a search operator for boolean properties. This is # If set, describes how the boolean should be used as a search operator.
309 # optional. Search operators let users restrict the query to specific fields
310 # relevant to the type of item being searched.
Bu Sun Kim65020912020-05-20 12:08:20 -0700311 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700312 # boolean property. For example, if operatorName is *closed* and the
313 # property&#x27;s name is *isClosed*, then queries like
314 # *closed:&amp;lt;value&amp;gt;* show results only where the value of the
315 # property named *isClosed* matches *&amp;lt;value&amp;gt;*. By contrast, a
316 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
Bu Sun Kim65020912020-05-20 12:08:20 -0700317 # all items where *&amp;lt;value&amp;gt;* matches the value of any
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700318 # String properties or text within the content field for the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700319 # The operator name can only contain lowercase letters (a-z).
320 # The maximum length is 32 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700321 },
322 },
323 &quot;integerPropertyOptions&quot;: { # Options for integer properties.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700324 &quot;orderedRanking&quot;: &quot;A String&quot;, # Used to specify the ordered ranking for the integer. Can only be used if
325 # isRepeatable
326 # is false.
Bu Sun Kim65020912020-05-20 12:08:20 -0700327 &quot;operatorOptions&quot;: { # Used to provide a search operator for integer properties. This is # If set, describes how the integer should be used as a search operator.
328 # optional. Search operators let users restrict the query to specific fields
329 # relevant to the type of item being searched.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700330 &quot;greaterThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
331 # integer property using the greater-than operator. For example, if
332 # greaterThanOperatorName is *priorityabove* and the property&#x27;s name is
333 # *priorityVal*, then queries like *priorityabove:&amp;lt;value&amp;gt;*
334 # show results only where the value of the property named *priorityVal* is
335 # greater than *&amp;lt;value&amp;gt;*.
336 # The operator name can only contain lowercase letters (a-z).
337 # The maximum length is 32 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700338 &quot;lessThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
339 # integer property using the less-than operator. For example, if
340 # lessThanOperatorName is *prioritybelow* and the property&#x27;s name is
341 # *priorityVal*, then queries like *prioritybelow:&amp;lt;value&amp;gt;*
342 # show results only where the value of the property named *priorityVal* is
343 # less than *&amp;lt;value&amp;gt;*.
344 # The operator name can only contain lowercase letters (a-z).
345 # The maximum length is 32 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700346 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700347 # integer property. For example, if operatorName is *priority* and the
Bu Sun Kim65020912020-05-20 12:08:20 -0700348 # property&#x27;s name is *priorityVal*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700349 # *priority:&amp;lt;value&amp;gt;* show results only where the value of the
350 # property named *priorityVal* matches *&amp;lt;value&amp;gt;*. By contrast, a
351 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
352 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700353 # properties or text within the content field for the item.
354 # The operator name can only contain lowercase letters (a-z).
355 # The maximum length is 32 characters.
356 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700357 &quot;minimumValue&quot;: &quot;A String&quot;, # The minimum value of the property. The minimum and maximum values for the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358 # property are used to rank results according to the
359 # ordered ranking.
Bu Sun Kim65020912020-05-20 12:08:20 -0700360 # Indexing requests with values less than the minimum are accepted and
361 # ranked with the same weight as items indexed with the minimum value.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700362 &quot;maximumValue&quot;: &quot;A String&quot;, # The maximum value of the property. The minimum and maximum values for the
363 # property are used to rank results according to the
364 # ordered ranking.
365 # Indexing requests with values greater than the maximum are accepted and
366 # ranked with the same weight as items indexed with the maximum value.
367 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700368 &quot;name&quot;: &quot;A String&quot;, # The name of the property. Item indexing requests sent to the Indexing API
369 # should set the property name
370 # equal to this value. For example, if name is *subject_line*, then indexing
371 # requests for document items with subject fields should set the
372 # name for that field equal to
373 # *subject_line*. Use the name as the identifier for the object property.
374 # Once registered as a property for an object, you cannot re-use this name
375 # for another property within that object.
376 # The name must start with a letter and can only contain letters (A-Z, a-z)
377 # or numbers (0-9).
378 # The maximum length is 256 characters.
379 &quot;isFacetable&quot;: True or False, # Indicates that the property can be used for generating facets. Cannot be
380 # true for properties whose type is object. IsReturnable must be true to set
381 # this option.
382 # Only supported for Boolean, Enum, and Text properties.
383 &quot;doublePropertyOptions&quot;: { # Options for double properties.
384 &quot;operatorOptions&quot;: { # Used to provide a search operator for double properties. This is # If set, describes how the double should be used as a search operator.
385 # optional. Search operators let users restrict the query to specific fields
386 # relevant to the type of item being searched.
387 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to use the
388 # double property in sorting or as a facet.
389 # The operator name can only contain lowercase letters (a-z).
390 # The maximum length is 32 characters.
391 },
392 },
393 &quot;isWildcardSearchable&quot;: True or False, # Indicates that users can perform wildcard search for this
394 # property. Only supported for Text properties. IsReturnable must be true to
395 # set this option. In a given datasource maximum of 5 properties can be
396 # marked as is_wildcard_searchable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700397 &quot;enumPropertyOptions&quot;: { # Options for enum properties, which allow you to define a restricted set of
398 # strings to match user queries, set rankings for those string values, and
399 # define an operator name to be paired with those strings so that users can
400 # narrow results to only items with a specific value. For example, for items in
401 # a request tracking system with priority information, you could define *p0* as
402 # an allowable enum value and tie this enum to the operator name *priority* so
403 # that search users could add *priority:p0* to their query to restrict the set
404 # of results to only those items indexed with the value *p0*.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700405 &quot;operatorOptions&quot;: { # Used to provide a search operator for enum properties. This is # If set, describes how the enum should be used as a search operator.
406 # optional. Search operators let users restrict the query to specific fields
407 # relevant to the type of item being searched. For example, if you provide no
408 # operator for a *priority* enum property with possible values *p0* and *p1*,
409 # a query that contains the term *p0* returns items that have *p0* as the
410 # value of the *priority* property, as well as any items that contain the
411 # string *p0* in other fields. If you provide an operator name for the enum,
412 # such as *priority*, then search users can use that operator to refine
413 # results to only items that have *p0* as this property&#x27;s value, with the
414 # query *priority:p0*.
415 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
416 # enum property. For example, if operatorName is *priority* and the
417 # property&#x27;s name is *priorityVal*, then queries like
418 # *priority:&amp;lt;value&amp;gt;* show results only where the value of the
419 # property named *priorityVal* matches *&amp;lt;value&amp;gt;*. By contrast, a
420 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
421 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
422 # properties or text within the content field for the item.
423 # The operator name can only contain lowercase letters (a-z).
424 # The maximum length is 32 characters.
425 },
426 &quot;orderedRanking&quot;: &quot;A String&quot;, # Used to specify the ordered ranking for the enumeration that determines how
427 # the integer values provided in the possible EnumValuePairs are used to rank
428 # results. If specified, integer values must be provided for all possible
429 # EnumValuePair values given for this property. Can only be used if
430 # isRepeatable
431 # is false.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700432 &quot;possibleValues&quot;: [ # The list of possible values for the enumeration property. All
433 # EnumValuePairs must provide a string value. If you specify an integer value
434 # for one EnumValuePair, then all possible EnumValuePairs must provide an
435 # integer value. Both the string value and integer value must be unique over
436 # all possible values. Once set, possible values cannot be removed or
437 # modified. If you supply an ordered ranking and think you might insert
438 # additional enum values in the future, leave gaps in the initial integer
439 # values to allow adding a value in between previously registered values.
440 # The maximum number of elements is 100.
441 { # The enumeration value pair defines two things: a required string value and
442 # an optional integer value. The string value defines the necessary query
443 # term required to retrieve that item, such as *p0* for a priority item.
444 # The integer value determines the ranking of that string value relative
445 # to other enumerated values for the same property. For example, you might
446 # associate *p0* with *0* and define another enum pair such as *p1* and *1*.
447 # You must use the integer value in combination with
448 # ordered
449 # ranking to
450 # set the ranking of a given value relative to other enumerated values for
451 # the same property name. Here, a ranking order of DESCENDING for *priority*
452 # properties results in a ranking boost for items indexed with a value of
453 # *p0* compared to items indexed with a value of *p1*. Without a specified
454 # ranking order, the integer value has no effect on item ranking.
455 &quot;integerValue&quot;: 42, # The integer value of the EnumValuePair which must be non-negative.
456 # Optional.
457 &quot;stringValue&quot;: &quot;A String&quot;, # The string value of the EnumValuePair.
458 # The maximum length is 32 characters.
459 },
460 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700461 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700462 &quot;isSortable&quot;: True or False, # Indicates that the property can be used for sorting. Cannot be true for
463 # properties that are repeatable. Cannot be true for properties whose type
464 # is object or user identifier. IsReturnable must be true to set this option.
465 # Only supported for Boolean, Date, Double, Integer, and Timestamp
466 # properties.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700467 &quot;datePropertyOptions&quot;: { # Options for date properties.
468 &quot;operatorOptions&quot;: { # Optional. Provides a search operator for date properties. # If set, describes how the date should be used as a search operator.
469 # Search operators let users restrict the query to specific fields relevant
470 # to the type of item being searched.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700471 &quot;lessThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
472 # date property using the less-than operator. For example, if
473 # lessThanOperatorName is *closedbefore* and the property&#x27;s name is
474 # *closeDate*, then queries like *closedbefore:&amp;lt;value&amp;gt;*
475 # show results only where the value of the property named *closeDate* is
476 # earlier than *&amp;lt;value&amp;gt;*.
477 # The operator name can only contain lowercase letters (a-z).
478 # The maximum length is 32 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700479 &quot;greaterThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
480 # date property using the greater-than operator. For example, if
481 # greaterThanOperatorName is *closedafter* and the property&#x27;s name is
482 # *closeDate*, then queries like *closedafter:&amp;lt;value&amp;gt;*
483 # show results only where the value of the property named *closeDate* is
484 # later than *&amp;lt;value&amp;gt;*.
485 # The operator name can only contain lowercase letters (a-z).
486 # The maximum length is 32 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700487 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the actual string required in the query in order to isolate the
488 # date property. For example, suppose an issue tracking schema object
489 # has a property named *closeDate* that specifies an operator with an
490 # operatorName of *closedon*. For searches on that data, queries like
491 # *closedon:&amp;lt;value&amp;gt;* show results only where the value of the
492 # *closeDate* property matches *&amp;lt;value&amp;gt;*. By contrast, a
493 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
494 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
495 # properties or text within the content field for the indexed datasource.
496 # The operator name can only contain lowercase letters (a-z).
497 # The maximum length is 32 characters.
498 },
499 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700500 },
501 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700502 &quot;name&quot;: &quot;A String&quot;, # Name for the object, which then defines its type. Item indexing requests
503 # should set the
504 # objectType field
505 # equal to this value. For example, if *name* is *Document*, then indexing
506 # requests for items of type Document should set
507 # objectType equal to
508 # *Document*. Each object definition must be uniquely named within a schema.
509 # The name must start with a letter and can only contain letters (A-Z, a-z)
510 # or numbers (0-9).
511 # The maximum length is 256 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700512 &quot;options&quot;: { # The options for an object. # The optional object-specific options.
513 &quot;freshnessOptions&quot;: { # Indicates which freshness property to use when adjusting search ranking for # The freshness options for an object.
514 # an item. Fresher, more recent dates indicate higher quality. Use the
515 # freshness option property that best works with your data. For fileshare
516 # documents, last modified time is most relevant. For calendar event data,
517 # the time when the event occurs is a more relevant freshness indicator. In
518 # this way, calendar events that occur closer to the time of the search query
519 # are considered higher quality and ranked accordingly.
520 &quot;freshnessProperty&quot;: &quot;A String&quot;, # This property indicates the freshness level of the object in the index.
521 # If set, this property must be a top-level property within the
522 # property definitions
523 # and it must be a
524 # timestamp type
525 # or
526 # date type.
527 # Otherwise, the Indexing API uses
528 # updateTime
529 # as the freshness indicator.
530 # The maximum length is 256 characters.
531 #
532 # When a property is used to calculate freshness, the value defaults
533 # to 2 years from the current time.
534 &quot;freshnessDuration&quot;: &quot;A String&quot;, # The duration after which an object should be considered
535 # stale. The default value is 180 days (in seconds).
536 },
537 &quot;displayOptions&quot;: { # The display options for an object. # Options that determine how the object is displayed in the Cloud Search
538 # results page.
539 &quot;metalines&quot;: [ # Defines the properties that are displayed in the metalines of the
540 # search results. The property values are displayed in the order given
541 # here. If a property holds multiple values, all of the values are
542 # displayed before the next properties. For this reason, it is a good
543 # practice to specify singular properties before repeated properties in this
544 # list. All of the properties must set
545 # is_returnable
546 # to true. The maximum number of metalines is 3.
547 { # A metaline is a list of properties that are displayed along with the search
548 # result to provide context.
549 &quot;properties&quot;: [ # The list of displayed properties for the metaline. The maximum number of
550 # properties is 5.
551 { # A reference to a top-level property within the object that should be
552 # displayed in search results. The values of the chosen properties is
553 # displayed in the search results along with the
554 # display label
555 # for that property if one is specified. If a display label is not specified,
556 # only the values is shown.
557 &quot;propertyName&quot;: &quot;A String&quot;, # The name of the top-level property as defined in a property definition
558 # for the object. If the name is not a defined property in the schema, an
559 # error is given when attempting to update the schema.
560 },
561 ],
562 },
563 ],
564 &quot;objectDisplayLabel&quot;: &quot;A String&quot;, # The user friendly label to display in the search result to indicate the
565 # type of the item. This is OPTIONAL; if not provided, an object label isn&#x27;t
566 # displayed on the context line of the search results. The maximum length
567 # is 64 characters.
568 },
569 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700570 },
571 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700572 }</pre>
573</div>
574
575<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700576 <code class="details" id="updateSchema">updateSchema(name, body=None, x__xgafv=None)</code>
577 <pre>Updates the schema of a data source. This method does not perform
578incremental updates to the schema. Instead, this method updates the schema
579by overwriting the entire schema.
580
581**Note:** This API requires an admin or service account to execute.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582
583Args:
584 name: string, Name of the data source to update Schema. Format:
585datasources/{source_id} (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700586 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700587 The object takes the form of:
588
589{
Bu Sun Kim65020912020-05-20 12:08:20 -0700590 &quot;schema&quot;: { # The schema definition for a data source. # The new schema for the source.
591 &quot;operationIds&quot;: [ # IDs of the Long Running Operations (LROs) currently running for this
592 # schema. After modifying the schema, wait for operations to complete
593 # before indexing additional content.
594 &quot;A String&quot;,
595 ],
596 &quot;objectDefinitions&quot;: [ # The list of top-level objects for the data source.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 # The maximum number of elements is 10.
598 { # The definition for an object within a data source.
Bu Sun Kim65020912020-05-20 12:08:20 -0700599 &quot;propertyDefinitions&quot;: [ # The property definitions for the object.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700600 # The maximum number of elements is 1000.
601 { # The definition of a property within an object.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700602 &quot;isRepeatable&quot;: True or False, # Indicates that multiple values are allowed for the property. For example, a
603 # document only has one description but can have multiple comments. Cannot be
604 # true for properties whose type is a boolean.
605 # If set to false, properties that contain more than one value cause the
606 # indexing request for that item to be rejected.
607 &quot;htmlPropertyOptions&quot;: { # Options for html properties.
608 &quot;operatorOptions&quot;: { # Used to provide a search operator for html properties. This is optional. # If set, describes how the property should be used as a search operator.
609 # Search operators let users restrict the query to specific fields relevant
610 # to the type of item being searched.
611 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
612 # html property. For example, if operatorName is *subject* and the
613 # property&#x27;s name is *subjectLine*, then queries like
614 # *subject:&amp;lt;value&amp;gt;* show results only where the value of the
615 # property named *subjectLine* matches *&amp;lt;value&amp;gt;*. By contrast, a
616 # search that uses the same *&amp;lt;value&amp;gt;* without an operator return
617 # all items where *&amp;lt;value&amp;gt;* matches the value of any
618 # html properties or text within the content field for the item.
619 # The operator name can only contain lowercase letters (a-z).
620 # The maximum length is 32 characters.
621 },
622 &quot;retrievalImportance&quot;: { # Indicates the search quality importance of the tokens within the
623 # field when used for retrieval. Can only be set to DEFAULT or NONE.
624 &quot;importance&quot;: &quot;A String&quot;, # Indicates the ranking importance given to property when it is matched
625 # during retrieval. Once set, the token importance of a property cannot be
626 # changed.
627 },
628 },
629 &quot;isReturnable&quot;: True or False, # Indicates that the property identifies data that should be returned in
630 # search results via the Query API. If set to *true*, indicates that Query
631 # API users can use matching property fields in results. However, storing
632 # fields requires more space allocation and uses more bandwidth for search
633 # queries, which impacts performance over large datasets. Set to *true* here
634 # only if the field is needed for search results. Cannot be true for
635 # properties whose type is an object.
Bu Sun Kim65020912020-05-20 12:08:20 -0700636 &quot;textPropertyOptions&quot;: { # Options for text properties.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700637 &quot;retrievalImportance&quot;: { # Indicates the search quality importance of the tokens within the
638 # field when used for retrieval.
639 &quot;importance&quot;: &quot;A String&quot;, # Indicates the ranking importance given to property when it is matched
640 # during retrieval. Once set, the token importance of a property cannot be
641 # changed.
642 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700643 &quot;operatorOptions&quot;: { # Used to provide a search operator for text properties. This is optional. # If set, describes how the property should be used as a search operator.
644 # Search operators let users restrict the query to specific fields relevant
645 # to the type of item being searched.
646 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
647 # text property. For example, if operatorName is *subject* and the
648 # property&#x27;s name is *subjectLine*, then queries like
649 # *subject:&amp;lt;value&amp;gt;* show results only where the value of the
650 # property named *subjectLine* matches *&amp;lt;value&amp;gt;*. By contrast, a
651 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
652 # all items where *&amp;lt;value&amp;gt;* matches the value of any
653 # text properties or text within the content field for the item.
654 # The operator name can only contain lowercase letters (a-z).
655 # The maximum length is 32 characters.
656 &quot;exactMatchWithOperator&quot;: True or False, # If true, the text value is tokenized as one atomic value in
657 # operator searches and facet matches. For example, if the operator name is
658 # &quot;genre&quot; and the value is &quot;science-fiction&quot; the query restrictions
659 # &quot;genre:science&quot; and &quot;genre:fiction&quot; doesn&#x27;t match the item;
660 # &quot;genre:science-fiction&quot; does. Value matching is case-sensitive
661 # and does not remove special characters.
662 # If false, the text is tokenized. For example, if the value is
663 # &quot;science-fiction&quot; the queries &quot;genre:science&quot; and &quot;genre:fiction&quot;
664 # matches the item.
665 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700666 },
667 &quot;displayOptions&quot;: { # The display options for a property. # Options that determine how the property is displayed in the Cloud Search
668 # results page if it is specified to be displayed in the object&#x27;s
669 # display options
670 # .
671 &quot;displayLabel&quot;: &quot;A String&quot;, # The user friendly label for the property that is used if the property
672 # is specified to be displayed in ObjectDisplayOptions. If provided, the
673 # display label is shown in front of the property values when the property is
674 # part of the object display options. For example, if the property value is
675 # &#x27;1&#x27;, the value by itself may not be useful context for the user. If the
676 # display name given was &#x27;priority&#x27;, then the user sees &#x27;priority : 1&#x27; in
677 # the search results which provides clear context to search users. This is
678 # OPTIONAL; if not given, only the property values are displayed.
679 # The maximum length is 64 characters.
680 },
681 &quot;timestampPropertyOptions&quot;: { # Options for timestamp properties.
682 &quot;operatorOptions&quot;: { # Used to provide a search operator for timestamp properties. This is # If set, describes how the timestamp should be used as a search operator.
683 # optional. Search operators let users restrict the query to specific fields
684 # relevant to the type of item being searched.
685 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
686 # timestamp property. For example, if operatorName is *closedon* and the
687 # property&#x27;s name is *closeDate*, then queries like
688 # *closedon:&amp;lt;value&amp;gt;* show results only where the value of the
689 # property named *closeDate* matches *&amp;lt;value&amp;gt;*. By contrast, a
690 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
691 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
692 # properties or text within the content field for the item. The operator
693 # name can only contain lowercase letters (a-z). The maximum length is 32
694 # characters.
695 &quot;lessThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
696 # timestamp property using the less-than operator. For example, if
697 # lessThanOperatorName is *closedbefore* and the property&#x27;s name is
698 # *closeDate*, then queries like *closedbefore:&amp;lt;value&amp;gt;*
699 # show results only where the value of the property named *closeDate* is
700 # earlier than *&amp;lt;value&amp;gt;*.
701 # The operator name can only contain lowercase letters (a-z).
702 # The maximum length is 32 characters.
703 &quot;greaterThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
704 # timestamp property using the greater-than operator. For example, if
705 # greaterThanOperatorName is *closedafter* and the property&#x27;s name is
706 # *closeDate*, then queries like *closedafter:&amp;lt;value&amp;gt;*
707 # show results only where the value of the property named *closeDate* is
708 # later than *&amp;lt;value&amp;gt;*.
709 # The operator name can only contain lowercase letters (a-z).
710 # The maximum length is 32 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700711 },
712 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700713 &quot;isSuggestable&quot;: True or False, # Indicates that the property can be used for generating query suggestions.
Bu Sun Kim65020912020-05-20 12:08:20 -0700714 &quot;objectPropertyOptions&quot;: { # Options for object properties.
715 &quot;subobjectProperties&quot;: [ # The properties of the sub-object. These properties represent a nested
Dan O'Mearadd494642020-05-01 07:42:23 -0700716 # object. For example, if this property represents a postal address, the
717 # subobjectProperties might be named *street*, *city*, and *state*.
718 # The maximum number of elements is 1000.
719 # Object with schema name: PropertyDefinition
720 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700722 &quot;booleanPropertyOptions&quot;: { # Options for boolean properties.
723 &quot;operatorOptions&quot;: { # Used to provide a search operator for boolean properties. This is # If set, describes how the boolean should be used as a search operator.
724 # optional. Search operators let users restrict the query to specific fields
725 # relevant to the type of item being searched.
Bu Sun Kim65020912020-05-20 12:08:20 -0700726 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700727 # boolean property. For example, if operatorName is *closed* and the
728 # property&#x27;s name is *isClosed*, then queries like
729 # *closed:&amp;lt;value&amp;gt;* show results only where the value of the
730 # property named *isClosed* matches *&amp;lt;value&amp;gt;*. By contrast, a
731 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
Bu Sun Kim65020912020-05-20 12:08:20 -0700732 # all items where *&amp;lt;value&amp;gt;* matches the value of any
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700733 # String properties or text within the content field for the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 # The operator name can only contain lowercase letters (a-z).
735 # The maximum length is 32 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700736 },
737 },
738 &quot;integerPropertyOptions&quot;: { # Options for integer properties.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700739 &quot;orderedRanking&quot;: &quot;A String&quot;, # Used to specify the ordered ranking for the integer. Can only be used if
740 # isRepeatable
741 # is false.
Bu Sun Kim65020912020-05-20 12:08:20 -0700742 &quot;operatorOptions&quot;: { # Used to provide a search operator for integer properties. This is # If set, describes how the integer should be used as a search operator.
743 # optional. Search operators let users restrict the query to specific fields
744 # relevant to the type of item being searched.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700745 &quot;greaterThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
746 # integer property using the greater-than operator. For example, if
747 # greaterThanOperatorName is *priorityabove* and the property&#x27;s name is
748 # *priorityVal*, then queries like *priorityabove:&amp;lt;value&amp;gt;*
749 # show results only where the value of the property named *priorityVal* is
750 # greater than *&amp;lt;value&amp;gt;*.
751 # The operator name can only contain lowercase letters (a-z).
752 # The maximum length is 32 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700753 &quot;lessThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
754 # integer property using the less-than operator. For example, if
755 # lessThanOperatorName is *prioritybelow* and the property&#x27;s name is
756 # *priorityVal*, then queries like *prioritybelow:&amp;lt;value&amp;gt;*
757 # show results only where the value of the property named *priorityVal* is
758 # less than *&amp;lt;value&amp;gt;*.
759 # The operator name can only contain lowercase letters (a-z).
760 # The maximum length is 32 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700761 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700762 # integer property. For example, if operatorName is *priority* and the
Bu Sun Kim65020912020-05-20 12:08:20 -0700763 # property&#x27;s name is *priorityVal*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700764 # *priority:&amp;lt;value&amp;gt;* show results only where the value of the
765 # property named *priorityVal* matches *&amp;lt;value&amp;gt;*. By contrast, a
766 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
767 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700768 # properties or text within the content field for the item.
769 # The operator name can only contain lowercase letters (a-z).
770 # The maximum length is 32 characters.
771 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700772 &quot;minimumValue&quot;: &quot;A String&quot;, # The minimum value of the property. The minimum and maximum values for the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700773 # property are used to rank results according to the
774 # ordered ranking.
Bu Sun Kim65020912020-05-20 12:08:20 -0700775 # Indexing requests with values less than the minimum are accepted and
776 # ranked with the same weight as items indexed with the minimum value.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700777 &quot;maximumValue&quot;: &quot;A String&quot;, # The maximum value of the property. The minimum and maximum values for the
778 # property are used to rank results according to the
779 # ordered ranking.
780 # Indexing requests with values greater than the maximum are accepted and
781 # ranked with the same weight as items indexed with the maximum value.
782 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700783 &quot;name&quot;: &quot;A String&quot;, # The name of the property. Item indexing requests sent to the Indexing API
784 # should set the property name
785 # equal to this value. For example, if name is *subject_line*, then indexing
786 # requests for document items with subject fields should set the
787 # name for that field equal to
788 # *subject_line*. Use the name as the identifier for the object property.
789 # Once registered as a property for an object, you cannot re-use this name
790 # for another property within that object.
791 # The name must start with a letter and can only contain letters (A-Z, a-z)
792 # or numbers (0-9).
793 # The maximum length is 256 characters.
794 &quot;isFacetable&quot;: True or False, # Indicates that the property can be used for generating facets. Cannot be
795 # true for properties whose type is object. IsReturnable must be true to set
796 # this option.
797 # Only supported for Boolean, Enum, and Text properties.
798 &quot;doublePropertyOptions&quot;: { # Options for double properties.
799 &quot;operatorOptions&quot;: { # Used to provide a search operator for double properties. This is # If set, describes how the double should be used as a search operator.
800 # optional. Search operators let users restrict the query to specific fields
801 # relevant to the type of item being searched.
802 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to use the
803 # double property in sorting or as a facet.
804 # The operator name can only contain lowercase letters (a-z).
805 # The maximum length is 32 characters.
806 },
807 },
808 &quot;isWildcardSearchable&quot;: True or False, # Indicates that users can perform wildcard search for this
809 # property. Only supported for Text properties. IsReturnable must be true to
810 # set this option. In a given datasource maximum of 5 properties can be
811 # marked as is_wildcard_searchable.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700812 &quot;enumPropertyOptions&quot;: { # Options for enum properties, which allow you to define a restricted set of
813 # strings to match user queries, set rankings for those string values, and
814 # define an operator name to be paired with those strings so that users can
815 # narrow results to only items with a specific value. For example, for items in
816 # a request tracking system with priority information, you could define *p0* as
817 # an allowable enum value and tie this enum to the operator name *priority* so
818 # that search users could add *priority:p0* to their query to restrict the set
819 # of results to only those items indexed with the value *p0*.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700820 &quot;operatorOptions&quot;: { # Used to provide a search operator for enum properties. This is # If set, describes how the enum should be used as a search operator.
821 # optional. Search operators let users restrict the query to specific fields
822 # relevant to the type of item being searched. For example, if you provide no
823 # operator for a *priority* enum property with possible values *p0* and *p1*,
824 # a query that contains the term *p0* returns items that have *p0* as the
825 # value of the *priority* property, as well as any items that contain the
826 # string *p0* in other fields. If you provide an operator name for the enum,
827 # such as *priority*, then search users can use that operator to refine
828 # results to only items that have *p0* as this property&#x27;s value, with the
829 # query *priority:p0*.
830 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
831 # enum property. For example, if operatorName is *priority* and the
832 # property&#x27;s name is *priorityVal*, then queries like
833 # *priority:&amp;lt;value&amp;gt;* show results only where the value of the
834 # property named *priorityVal* matches *&amp;lt;value&amp;gt;*. By contrast, a
835 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
836 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
837 # properties or text within the content field for the item.
838 # The operator name can only contain lowercase letters (a-z).
839 # The maximum length is 32 characters.
840 },
841 &quot;orderedRanking&quot;: &quot;A String&quot;, # Used to specify the ordered ranking for the enumeration that determines how
842 # the integer values provided in the possible EnumValuePairs are used to rank
843 # results. If specified, integer values must be provided for all possible
844 # EnumValuePair values given for this property. Can only be used if
845 # isRepeatable
846 # is false.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700847 &quot;possibleValues&quot;: [ # The list of possible values for the enumeration property. All
848 # EnumValuePairs must provide a string value. If you specify an integer value
849 # for one EnumValuePair, then all possible EnumValuePairs must provide an
850 # integer value. Both the string value and integer value must be unique over
851 # all possible values. Once set, possible values cannot be removed or
852 # modified. If you supply an ordered ranking and think you might insert
853 # additional enum values in the future, leave gaps in the initial integer
854 # values to allow adding a value in between previously registered values.
855 # The maximum number of elements is 100.
856 { # The enumeration value pair defines two things: a required string value and
857 # an optional integer value. The string value defines the necessary query
858 # term required to retrieve that item, such as *p0* for a priority item.
859 # The integer value determines the ranking of that string value relative
860 # to other enumerated values for the same property. For example, you might
861 # associate *p0* with *0* and define another enum pair such as *p1* and *1*.
862 # You must use the integer value in combination with
863 # ordered
864 # ranking to
865 # set the ranking of a given value relative to other enumerated values for
866 # the same property name. Here, a ranking order of DESCENDING for *priority*
867 # properties results in a ranking boost for items indexed with a value of
868 # *p0* compared to items indexed with a value of *p1*. Without a specified
869 # ranking order, the integer value has no effect on item ranking.
870 &quot;integerValue&quot;: 42, # The integer value of the EnumValuePair which must be non-negative.
871 # Optional.
872 &quot;stringValue&quot;: &quot;A String&quot;, # The string value of the EnumValuePair.
873 # The maximum length is 32 characters.
874 },
875 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700876 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700877 &quot;isSortable&quot;: True or False, # Indicates that the property can be used for sorting. Cannot be true for
878 # properties that are repeatable. Cannot be true for properties whose type
879 # is object or user identifier. IsReturnable must be true to set this option.
880 # Only supported for Boolean, Date, Double, Integer, and Timestamp
881 # properties.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700882 &quot;datePropertyOptions&quot;: { # Options for date properties.
883 &quot;operatorOptions&quot;: { # Optional. Provides a search operator for date properties. # If set, describes how the date should be used as a search operator.
884 # Search operators let users restrict the query to specific fields relevant
885 # to the type of item being searched.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700886 &quot;lessThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
887 # date property using the less-than operator. For example, if
888 # lessThanOperatorName is *closedbefore* and the property&#x27;s name is
889 # *closeDate*, then queries like *closedbefore:&amp;lt;value&amp;gt;*
890 # show results only where the value of the property named *closeDate* is
891 # earlier than *&amp;lt;value&amp;gt;*.
892 # The operator name can only contain lowercase letters (a-z).
893 # The maximum length is 32 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700894 &quot;greaterThanOperatorName&quot;: &quot;A String&quot;, # Indicates the operator name required in the query in order to isolate the
895 # date property using the greater-than operator. For example, if
896 # greaterThanOperatorName is *closedafter* and the property&#x27;s name is
897 # *closeDate*, then queries like *closedafter:&amp;lt;value&amp;gt;*
898 # show results only where the value of the property named *closeDate* is
899 # later than *&amp;lt;value&amp;gt;*.
900 # The operator name can only contain lowercase letters (a-z).
901 # The maximum length is 32 characters.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700902 &quot;operatorName&quot;: &quot;A String&quot;, # Indicates the actual string required in the query in order to isolate the
903 # date property. For example, suppose an issue tracking schema object
904 # has a property named *closeDate* that specifies an operator with an
905 # operatorName of *closedon*. For searches on that data, queries like
906 # *closedon:&amp;lt;value&amp;gt;* show results only where the value of the
907 # *closeDate* property matches *&amp;lt;value&amp;gt;*. By contrast, a
908 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
909 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
910 # properties or text within the content field for the indexed datasource.
911 # The operator name can only contain lowercase letters (a-z).
912 # The maximum length is 32 characters.
913 },
914 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700915 },
916 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700917 &quot;name&quot;: &quot;A String&quot;, # Name for the object, which then defines its type. Item indexing requests
918 # should set the
919 # objectType field
920 # equal to this value. For example, if *name* is *Document*, then indexing
921 # requests for items of type Document should set
922 # objectType equal to
923 # *Document*. Each object definition must be uniquely named within a schema.
924 # The name must start with a letter and can only contain letters (A-Z, a-z)
925 # or numbers (0-9).
926 # The maximum length is 256 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700927 &quot;options&quot;: { # The options for an object. # The optional object-specific options.
928 &quot;freshnessOptions&quot;: { # Indicates which freshness property to use when adjusting search ranking for # The freshness options for an object.
929 # an item. Fresher, more recent dates indicate higher quality. Use the
930 # freshness option property that best works with your data. For fileshare
931 # documents, last modified time is most relevant. For calendar event data,
932 # the time when the event occurs is a more relevant freshness indicator. In
933 # this way, calendar events that occur closer to the time of the search query
934 # are considered higher quality and ranked accordingly.
935 &quot;freshnessProperty&quot;: &quot;A String&quot;, # This property indicates the freshness level of the object in the index.
936 # If set, this property must be a top-level property within the
937 # property definitions
938 # and it must be a
939 # timestamp type
940 # or
941 # date type.
942 # Otherwise, the Indexing API uses
943 # updateTime
944 # as the freshness indicator.
945 # The maximum length is 256 characters.
946 #
947 # When a property is used to calculate freshness, the value defaults
948 # to 2 years from the current time.
949 &quot;freshnessDuration&quot;: &quot;A String&quot;, # The duration after which an object should be considered
950 # stale. The default value is 180 days (in seconds).
951 },
952 &quot;displayOptions&quot;: { # The display options for an object. # Options that determine how the object is displayed in the Cloud Search
953 # results page.
954 &quot;metalines&quot;: [ # Defines the properties that are displayed in the metalines of the
955 # search results. The property values are displayed in the order given
956 # here. If a property holds multiple values, all of the values are
957 # displayed before the next properties. For this reason, it is a good
958 # practice to specify singular properties before repeated properties in this
959 # list. All of the properties must set
960 # is_returnable
961 # to true. The maximum number of metalines is 3.
962 { # A metaline is a list of properties that are displayed along with the search
963 # result to provide context.
964 &quot;properties&quot;: [ # The list of displayed properties for the metaline. The maximum number of
965 # properties is 5.
966 { # A reference to a top-level property within the object that should be
967 # displayed in search results. The values of the chosen properties is
968 # displayed in the search results along with the
969 # display label
970 # for that property if one is specified. If a display label is not specified,
971 # only the values is shown.
972 &quot;propertyName&quot;: &quot;A String&quot;, # The name of the top-level property as defined in a property definition
973 # for the object. If the name is not a defined property in the schema, an
974 # error is given when attempting to update the schema.
975 },
976 ],
977 },
978 ],
979 &quot;objectDisplayLabel&quot;: &quot;A String&quot;, # The user friendly label to display in the search result to indicate the
980 # type of the item. This is OPTIONAL; if not provided, an object label isn&#x27;t
981 # displayed on the context line of the search results. The maximum length
982 # is 64 characters.
983 },
984 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700985 },
986 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700987 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700988 &quot;validateOnly&quot;: True or False, # If true, the schema will be checked for validity,
989 # but will not be registered with the data source, even if valid.
990 &quot;debugOptions&quot;: { # Shared request debug options for all cloudsearch RPC methods. # Common debug options.
991 &quot;enableDebugging&quot;: True or False, # If you are asked by Google to help with debugging, set this field.
992 # Otherwise, ignore this field.
993 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700994 }
995
996 x__xgafv: string, V1 error format.
997 Allowed values
998 1 - v1 error format
999 2 - v2 error format
1000
1001Returns:
1002 An object of the form:
1003
1004 { # This resource represents a long-running operation that is the result of a
1005 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001006 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Dan O'Mearadd494642020-05-01 07:42:23 -07001007 # method returns no data on success, such as `Delete`, the response is
1008 # `google.protobuf.Empty`. If the original method is standard
1009 # `Get`/`Create`/`Update`, the response should be the resource. For other
1010 # methods, the response should have the type `XxxResponse`, where `Xxx`
1011 # is the original method name. For example, if the original method name
1012 # is `TakeSnapshot()`, the inferred response type is
1013 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001014 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -07001015 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001016 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1017 # contains progress information and common metadata such as create time.
1018 # Some services might not provide such metadata. Any method that returns a
1019 # long-running operation should document the metadata type, if any.
1020 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1021 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001023 # different programming environments, including REST APIs and RPC APIs. It is
1024 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1025 # three pieces of data: error code, error message, and error details.
1026 #
1027 # You can find out more about this error model and how to work with it in the
1028 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -07001029 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001030 # message types for APIs to use.
1031 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001032 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001033 },
1034 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001035 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1036 # user-facing error message should be localized and sent in the
1037 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001038 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim65020912020-05-20 12:08:20 -07001039 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001040 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
1041 # originally returns it. If you use the default HTTP mapping, the
1042 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001043 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
1044 # If `true`, the operation is completed, and either `error` or `response` is
1045 # available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001046 }</pre>
1047</div>
1048
1049</body></html>