blob: 4baea8494b16dabf9cd406dd0bea08e942881332 [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.
113 "metadata": { # Service-specific metadata associated with the operation. It typically
114 # contains progress information and common metadata such as create time.
115 # Some services might not provide such metadata. Any method that returns a
116 # long-running operation should document the metadata type, if any.
117 "a_key": "", # Properties of the object. Contains field @type with type URL.
118 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700119 "done": True or False, # If the value is `false`, it means the operation is still in progress.
120 # If `true`, the operation is completed, and either `error` or `response` is
121 # available.
122 "response": { # The normal response of the operation in case of success. If the original
123 # method returns no data on success, such as `Delete`, the response is
124 # `google.protobuf.Empty`. If the original method is standard
125 # `Get`/`Create`/`Update`, the response should be the resource. For other
126 # methods, the response should have the type `XxxResponse`, where `Xxx`
127 # is the original method name. For example, if the original method name
128 # is `TakeSnapshot()`, the inferred response type is
129 # `TakeSnapshotResponse`.
130 "a_key": "", # Properties of the object. Contains field @type with type URL.
131 },
132 "name": "A String", # The server-assigned name, which is only unique within the same service that
133 # originally returns it. If you use the default HTTP mapping, the
134 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
136 # different programming environments, including REST APIs and RPC APIs. It is
137 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
138 # three pieces of data: error code, error message, and error details.
139 #
140 # You can find out more about this error model and how to work with it in the
141 # [API Design Guide](https://cloud.google.com/apis/design/errors).
142 "message": "A String", # 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.
145 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
146 "details": [ # A list of messages that carry the error details. There is a common set of
147 # message types for APIs to use.
148 {
149 "a_key": "", # Properties of the object. Contains field @type with type URL.
150 },
151 ],
152 },
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.
176 "objectDefinitions": [ # The list of top-level objects for the data source.
177 # The maximum number of elements is 10.
178 { # The definition for an object within a data source.
179 "propertyDefinitions": [ # The property definitions for the object.
180 # The maximum number of elements is 1000.
181 { # The definition of a property within an object.
182 "htmlPropertyOptions": { # Options for html properties.
183 "retrievalImportance": { # Indicates the search quality importance of the tokens within the
184 # field when used for retrieval. Can only be set to DEFAULT or NONE.
185 "importance": "A String", # Indicates the ranking importance given to property when it is matched
186 # during retrieval. Once set, the token importance of a property cannot be
187 # changed.
188 },
189 "operatorOptions": { # 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.
190 # Search operators let users restrict the query to specific fields relevant
191 # to the type of item being searched.
192 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
193 # html property. For example, if operatorName is *subject* and the
194 # property's name is *subjectLine*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 # *subject:&amp;lt;value&amp;gt;* show results only where the value of the
196 # property named *subjectLine* matches *&amp;lt;value&amp;gt;*. By contrast, a
197 # search that uses the same *&amp;lt;value&amp;gt;* without an operator return
198 # all items where *&amp;lt;value&amp;gt;* matches the value of any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199 # html properties or text within the content field for the item.
200 # The operator name can only contain lowercase letters (a-z).
201 # The maximum length is 32 characters.
202 },
203 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700204 "isWildcardSearchable": True or False, # Indicates that users can perform wildcard search for this
205 # property. Only supported for Text properties. IsReturnable must be true to
206 # set this option. In a given datasource maximum of 5 properties can be
207 # marked as is_wildcard_searchable.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208 "textPropertyOptions": { # Options for text properties.
209 "retrievalImportance": { # Indicates the search quality importance of the tokens within the
210 # field when used for retrieval.
211 "importance": "A String", # Indicates the ranking importance given to property when it is matched
212 # during retrieval. Once set, the token importance of a property cannot be
213 # changed.
214 },
215 "operatorOptions": { # 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.
216 # Search operators let users restrict the query to specific fields relevant
217 # to the type of item being searched.
Dan O'Mearadd494642020-05-01 07:42:23 -0700218 "exactMatchWithOperator": True or False, # If true, the text value is tokenized as one atomic value in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700219 # operator searches and facet matches. For example, if the operator name is
220 # "genre" and the value is "science-fiction" the query restrictions
Dan O'Mearadd494642020-05-01 07:42:23 -0700221 # "genre:science" and "genre:fiction" doesn't match the item;
222 # "genre:science-fiction" does. Value matching is case-sensitive
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223 # and does not remove special characters.
Dan O'Mearadd494642020-05-01 07:42:23 -0700224 # If false, the text is tokenized. For example, if the value is
225 # "science-fiction" the queries "genre:science" and "genre:fiction"
226 # matches the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
228 # text property. For example, if operatorName is *subject* and the
229 # property's name is *subjectLine*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700230 # *subject:&amp;lt;value&amp;gt;* show results only where the value of the
231 # property named *subjectLine* matches *&amp;lt;value&amp;gt;*. By contrast, a
232 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
233 # all items where *&amp;lt;value&amp;gt;* matches the value of any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234 # text properties or text within the content field for the item.
235 # The operator name can only contain lowercase letters (a-z).
236 # The maximum length is 32 characters.
237 },
238 },
239 "name": "A String", # The name of the property. Item indexing requests sent to the Indexing API
240 # should set the property name
241 # equal to this value. For example, if name is *subject_line*, then indexing
242 # requests for document items with subject fields should set the
243 # name for that field equal to
244 # *subject_line*. Use the name as the identifier for the object property.
245 # Once registered as a property for an object, you cannot re-use this name
246 # for another property within that object.
247 # The name must start with a letter and can only contain letters (A-Z, a-z)
248 # or numbers (0-9).
249 # The maximum length is 256 characters.
250 "enumPropertyOptions": { # Options for enum properties, which allow you to define a restricted set of
251 # strings to match user queries, set rankings for those string values, and
252 # define an operator name to be paired with those strings so that users can
253 # narrow results to only items with a specific value. For example, for items in
254 # a request tracking system with priority information, you could define *p0* as
255 # an allowable enum value and tie this enum to the operator name *priority* so
256 # that search users could add *priority:p0* to their query to restrict the set
257 # of results to only those items indexed with the value *p0*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700258 "possibleValues": [ # The list of possible values for the enumeration property. All
259 # EnumValuePairs must provide a string value. If you specify an integer value
260 # for one EnumValuePair, then all possible EnumValuePairs must provide an
261 # integer value. Both the string value and integer value must be unique over
262 # all possible values. Once set, possible values cannot be removed or
263 # modified. If you supply an ordered ranking and think you might insert
264 # additional enum values in the future, leave gaps in the initial integer
265 # values to allow adding a value in between previously registered values.
266 # The maximum number of elements is 100.
267 { # The enumeration value pair defines two things: a required string value and
268 # an optional integer value. The string value defines the necessary query
269 # term required to retrieve that item, such as *p0* for a priority item.
270 # The integer value determines the ranking of that string value relative
271 # to other enumerated values for the same property. For example, you might
272 # associate *p0* with *0* and define another enum pair such as *p1* and *1*.
273 # You must use the integer value in combination with
274 # ordered
275 # ranking to
276 # set the ranking of a given value relative to other enumerated values for
277 # the same property name. Here, a ranking order of DESCENDING for *priority*
278 # properties results in a ranking boost for items indexed with a value of
279 # *p0* compared to items indexed with a value of *p1*. Without a specified
280 # ranking order, the integer value has no effect on item ranking.
281 "stringValue": "A String", # The string value of the EnumValuePair.
282 # The maximum length is 32 characters.
283 "integerValue": 42, # The integer value of the EnumValuePair which must be non-negative.
284 # Optional.
285 },
286 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700287 "operatorOptions": { # Used to provide a search operator for enum properties. This is # If set, describes how the enum should be used as a search operator.
288 # optional. Search operators let users restrict the query to specific fields
289 # relevant to the type of item being searched. For example, if you provide no
290 # operator for a *priority* enum property with possible values *p0* and *p1*,
291 # a query that contains the term *p0* returns items that have *p0* as the
292 # value of the *priority* property, as well as any items that contain the
293 # string *p0* in other fields. If you provide an operator name for the enum,
294 # such as *priority*, then search users can use that operator to refine
295 # results to only items that have *p0* as this property's value, with the
296 # query *priority:p0*.
297 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
298 # enum property. For example, if operatorName is *priority* and the
299 # property's name is *priorityVal*, then queries like
300 # *priority:&amp;lt;value&amp;gt;* show results only where the value of the
301 # property named *priorityVal* matches *&amp;lt;value&amp;gt;*. By contrast, a
302 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
303 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
304 # properties or text within the content field for the item.
305 # The operator name can only contain lowercase letters (a-z).
306 # The maximum length is 32 characters.
307 },
308 "orderedRanking": "A String", # Used to specify the ordered ranking for the enumeration that determines how
309 # the integer values provided in the possible EnumValuePairs are used to rank
310 # results. If specified, integer values must be provided for all possible
311 # EnumValuePair values given for this property. Can only be used if
312 # isRepeatable
313 # is false.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700314 },
315 "isReturnable": True or False, # Indicates that the property identifies data that should be returned in
316 # search results via the Query API. If set to *true*, indicates that Query
317 # API users can use matching property fields in results. However, storing
318 # fields requires more space allocation and uses more bandwidth for search
319 # queries, which impacts performance over large datasets. Set to *true* here
320 # only if the field is needed for search results. Cannot be true for
321 # properties whose type is an object.
Dan O'Mearadd494642020-05-01 07:42:23 -0700322 "isRepeatable": True or False, # Indicates that multiple values are allowed for the property. For example, a
323 # document only has one description but can have multiple comments. Cannot be
324 # true for properties whose type is a boolean.
325 # If set to false, properties that contain more than one value cause the
326 # indexing request for that item to be rejected.
327 "doublePropertyOptions": { # Options for double properties.
328 "operatorOptions": { # Used to provide a search operator for double properties. This is # If set, describes how the double should be used as a search operator.
329 # optional. Search operators let users restrict the query to specific fields
330 # relevant to the type of item being searched.
331 "operatorName": "A String", # Indicates the operator name required in the query in order to use the
332 # double property in sorting or as a facet.
333 # The operator name can only contain lowercase letters (a-z).
334 # The maximum length is 32 characters.
335 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700336 },
337 "timestampPropertyOptions": { # Options for timestamp properties.
338 "operatorOptions": { # Used to provide a search operator for timestamp properties. This is # If set, describes how the timestamp should be used as a search operator.
339 # optional. Search operators let users restrict the query to specific fields
340 # relevant to the type of item being searched.
341 "lessThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
342 # timestamp property using the less-than operator. For example, if
343 # lessThanOperatorName is *closedbefore* and the property's name is
Dan O'Mearadd494642020-05-01 07:42:23 -0700344 # *closeDate*, then queries like *closedbefore:&amp;lt;value&amp;gt;*
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 # show results only where the value of the property named *closeDate* is
Dan O'Mearadd494642020-05-01 07:42:23 -0700346 # earlier than *&amp;lt;value&amp;gt;*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700347 # The operator name can only contain lowercase letters (a-z).
348 # The maximum length is 32 characters.
349 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
350 # timestamp property. For example, if operatorName is *closedon* and the
351 # property's name is *closeDate*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700352 # *closedon:&amp;lt;value&amp;gt;* show results only where the value of the
353 # property named *closeDate* matches *&amp;lt;value&amp;gt;*. By contrast, a
354 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
355 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700356 # properties or text within the content field for the item. The operator
357 # name can only contain lowercase letters (a-z). The maximum length is 32
358 # characters.
359 "greaterThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
360 # timestamp property using the greater-than operator. For example, if
361 # greaterThanOperatorName is *closedafter* and the property's name is
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 # *closeDate*, then queries like *closedafter:&amp;lt;value&amp;gt;*
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 # show results only where the value of the property named *closeDate* is
Dan O'Mearadd494642020-05-01 07:42:23 -0700364 # later than *&amp;lt;value&amp;gt;*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700365 # The operator name can only contain lowercase letters (a-z).
366 # The maximum length is 32 characters.
367 },
368 },
369 "datePropertyOptions": { # Options for date properties.
370 "operatorOptions": { # Optional. Provides a search operator for date properties. # If set, describes how the date should be used as a search operator.
371 # Search operators let users restrict the query to specific fields relevant
372 # to the type of item being searched.
373 "lessThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
374 # date property using the less-than operator. For example, if
375 # lessThanOperatorName is *closedbefore* and the property's name is
Dan O'Mearadd494642020-05-01 07:42:23 -0700376 # *closeDate*, then queries like *closedbefore:&amp;lt;value&amp;gt;*
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700377 # show results only where the value of the property named *closeDate* is
Dan O'Mearadd494642020-05-01 07:42:23 -0700378 # earlier than *&amp;lt;value&amp;gt;*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700379 # The operator name can only contain lowercase letters (a-z).
380 # The maximum length is 32 characters.
381 "operatorName": "A String", # Indicates the actual string required in the query in order to isolate the
382 # date property. For example, suppose an issue tracking schema object
383 # has a property named *closeDate* that specifies an operator with an
384 # operatorName of *closedon*. For searches on that data, queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700385 # *closedon:&amp;lt;value&amp;gt;* show results only where the value of the
386 # *closeDate* property matches *&amp;lt;value&amp;gt;*. By contrast, a
387 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
388 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700389 # properties or text within the content field for the indexed datasource.
390 # The operator name can only contain lowercase letters (a-z).
391 # The maximum length is 32 characters.
392 "greaterThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
393 # date property using the greater-than operator. For example, if
394 # greaterThanOperatorName is *closedafter* and the property's name is
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 # *closeDate*, then queries like *closedafter:&amp;lt;value&amp;gt;*
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700396 # show results only where the value of the property named *closeDate* is
Dan O'Mearadd494642020-05-01 07:42:23 -0700397 # later than *&amp;lt;value&amp;gt;*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700398 # The operator name can only contain lowercase letters (a-z).
399 # The maximum length is 32 characters.
400 },
401 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700402 "isSortable": True or False, # Indicates that the property can be used for sorting. Cannot be true for
403 # properties that are repeatable. Cannot be true for properties whose type
404 # is object or user identifier. IsReturnable must be true to set this option.
405 # Only supported for Boolean, Date, Double, Integer, and Timestamp
406 # properties.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700407 "booleanPropertyOptions": { # Options for boolean properties.
408 "operatorOptions": { # Used to provide a search operator for boolean properties. This is # If set, describes how the boolean should be used as a search operator.
409 # optional. Search operators let users restrict the query to specific fields
410 # relevant to the type of item being searched.
411 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
412 # boolean property. For example, if operatorName is *closed* and the
413 # property's name is *isClosed*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700414 # *closed:&amp;lt;value&amp;gt;* show results only where the value of the
415 # property named *isClosed* matches *&amp;lt;value&amp;gt;*. By contrast, a
416 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
417 # all items where *&amp;lt;value&amp;gt;* matches the value of any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700418 # String properties or text within the content field for the item.
419 # The operator name can only contain lowercase letters (a-z).
420 # The maximum length is 32 characters.
421 },
422 },
423 "isFacetable": True or False, # Indicates that the property can be used for generating facets. Cannot be
424 # true for properties whose type is object. IsReturnable must be true to set
425 # this option.
426 # Only supported for Boolean, Enum, and Text properties.
Dan O'Mearadd494642020-05-01 07:42:23 -0700427 "isSuggestable": True or False, # Indicates that the property can be used for generating query suggestions.
428 "objectPropertyOptions": { # Options for object properties.
429 "subobjectProperties": [ # The properties of the sub-object. These properties represent a nested
430 # object. For example, if this property represents a postal address, the
431 # subobjectProperties might be named *street*, *city*, and *state*.
432 # The maximum number of elements is 1000.
433 # Object with schema name: PropertyDefinition
434 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700435 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700436 "displayOptions": { # The display options for a property. # Options that determine how the property is displayed in the Cloud Search
437 # results page if it is specified to be displayed in the object's
438 # display options
439 # .
440 "displayLabel": "A String", # The user friendly label for the property that is used if the property
441 # is specified to be displayed in ObjectDisplayOptions. If provided, the
442 # display label is shown in front of the property values when the property is
443 # part of the object display options. For example, if the property value is
444 # '1', the value by itself may not be useful context for the user. If the
445 # display name given was 'priority', then the user sees 'priority : 1' in
446 # the search results which provides clear context to search users. This is
447 # OPTIONAL; if not given, only the property values are displayed.
448 # The maximum length is 32 characters.
449 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700450 "integerPropertyOptions": { # Options for integer properties.
451 "orderedRanking": "A String", # Used to specify the ordered ranking for the integer. Can only be used if
452 # isRepeatable
453 # is false.
454 "minimumValue": "A String", # The minimum value of the property. The minimum and maximum values for the
455 # property are used to rank results according to the
456 # ordered ranking.
457 # Indexing requests with values less than the minimum are accepted and
458 # ranked with the same weight as items indexed with the minimum value.
459 "operatorOptions": { # Used to provide a search operator for integer properties. This is # If set, describes how the integer should be used as a search operator.
460 # optional. Search operators let users restrict the query to specific fields
461 # relevant to the type of item being searched.
462 "lessThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
463 # integer property using the less-than operator. For example, if
464 # lessThanOperatorName is *prioritybelow* and the property's name is
Dan O'Mearadd494642020-05-01 07:42:23 -0700465 # *priorityVal*, then queries like *prioritybelow:&amp;lt;value&amp;gt;*
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700466 # show results only where the value of the property named *priorityVal* is
Dan O'Mearadd494642020-05-01 07:42:23 -0700467 # less than *&amp;lt;value&amp;gt;*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700468 # The operator name can only contain lowercase letters (a-z).
469 # The maximum length is 32 characters.
470 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
471 # integer property. For example, if operatorName is *priority* and the
472 # property's name is *priorityVal*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700473 # *priority:&amp;lt;value&amp;gt;* show results only where the value of the
474 # property named *priorityVal* matches *&amp;lt;value&amp;gt;*. By contrast, a
475 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
476 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700477 # properties or text within the content field for the item.
478 # The operator name can only contain lowercase letters (a-z).
479 # The maximum length is 32 characters.
Dan O'Mearadd494642020-05-01 07:42:23 -0700480 "greaterThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
481 # integer property using the greater-than operator. For example, if
482 # greaterThanOperatorName is *priorityabove* and the property's name is
483 # *priorityVal*, then queries like *priorityabove:&amp;lt;value&amp;gt;*
484 # show results only where the value of the property named *priorityVal* is
485 # greater than *&amp;lt;value&amp;gt;*.
486 # The operator name can only contain lowercase letters (a-z).
487 # The maximum length is 32 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700488 },
489 "maximumValue": "A String", # The maximum value of the property. The minimum and maximum values for the
490 # property are used to rank results according to the
491 # ordered ranking.
492 # Indexing requests with values greater than the maximum are accepted and
493 # ranked with the same weight as items indexed with the maximum value.
494 },
495 },
496 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700497 "options": { # The options for an object. # The optional object-specific options.
498 "freshnessOptions": { # Indicates which freshness property to use when adjusting search ranking for # The freshness options for an object.
499 # an item. Fresher, more recent dates indicate higher quality. Use the
500 # freshness option property that best works with your data. For fileshare
501 # documents, last modified time is most relevant. For calendar event data,
502 # the time when the event occurs is a more relevant freshness indicator. In
503 # this way, calendar events that occur closer to the time of the search query
504 # are considered higher quality and ranked accordingly.
505 "freshnessDuration": "A String", # The duration after which an object should be considered
506 # stale. The default value is 180 days (in seconds).
507 "freshnessProperty": "A String", # This property indicates the freshness level of the object in the index.
508 # If set, this property must be a top-level property within the
509 # property definitions
510 # and it must be a
511 # timestamp type
512 # or
513 # date type.
514 # Otherwise, the Indexing API uses
515 # updateTime
516 # as the freshness indicator.
517 # The maximum length is 256 characters.
518 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700519 # When a property is used to calculate freshness, the value defaults
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700520 # to 2 years from the current time.
521 },
522 "displayOptions": { # The display options for an object. # Options that determine how the object is displayed in the Cloud Search
523 # results page.
Dan O'Mearadd494642020-05-01 07:42:23 -0700524 "metalines": [ # Defines the properties that are displayed in the metalines of the
525 # search results. The property values are displayed in the order given
526 # here. If a property holds multiple values, all of the values are
527 # displayed before the next properties. For this reason, it is a good
528 # practice to specify singular properties before repeated properties in this
529 # list. All of the properties must set
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700530 # is_returnable
531 # to true. The maximum number of metalines is 3.
532 { # A metaline is a list of properties that are displayed along with the search
533 # result to provide context.
Dan O'Mearadd494642020-05-01 07:42:23 -0700534 "properties": [ # The list of displayed properties for the metaline. The maximum number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700535 # properties is 5.
536 { # A reference to a top-level property within the object that should be
Dan O'Mearadd494642020-05-01 07:42:23 -0700537 # displayed in search results. The values of the chosen properties is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700538 # displayed in the search results along with the
Dan O'Mearadd494642020-05-01 07:42:23 -0700539 # display label
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700540 # for that property if one is specified. If a display label is not specified,
Dan O'Mearadd494642020-05-01 07:42:23 -0700541 # only the values is shown.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 "propertyName": "A String", # The name of the top-level property as defined in a property definition
543 # for the object. If the name is not a defined property in the schema, an
Dan O'Mearadd494642020-05-01 07:42:23 -0700544 # error is given when attempting to update the schema.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 },
546 ],
547 },
548 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700549 "objectDisplayLabel": "A String", # The user friendly label to display in the search result to indicate the
550 # type of the item. This is OPTIONAL; if not provided, an object label isn't
551 # displayed on the context line of the search results. The maximum length
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700552 # is 32 characters.
553 },
554 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700555 "name": "A String", # Name for the object, which then defines its type. Item indexing requests
556 # should set the
557 # objectType field
558 # equal to this value. For example, if *name* is *Document*, then indexing
559 # requests for items of type Document should set
560 # objectType equal to
561 # *Document*. Each object definition must be uniquely named within a schema.
562 # The name must start with a letter and can only contain letters (A-Z, a-z)
563 # or numbers (0-9).
564 # The maximum length is 256 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 },
566 ],
567 "operationIds": [ # IDs of the Long Running Operations (LROs) currently running for this
568 # schema. After modifying the schema, wait for operations to complete
569 # before indexing additional content.
570 "A String",
571 ],
572 }</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{
Dan O'Mearadd494642020-05-01 07:42:23 -0700590 "validateOnly": True or False, # If true, the schema will be checked for validity,
591 # but will not be registered with the data source, even if valid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700592 "debugOptions": { # Shared request debug options for all cloudsearch RPC methods. # Common debug options.
593 "enableDebugging": True or False, # If you are asked by Google to help with debugging, set this field.
594 # Otherwise, ignore this field.
595 },
596 "schema": { # The schema definition for a data source. # The new schema for the source.
597 "objectDefinitions": [ # The list of top-level objects for the data source.
598 # The maximum number of elements is 10.
599 { # The definition for an object within a data source.
600 "propertyDefinitions": [ # The property definitions for the object.
601 # The maximum number of elements is 1000.
602 { # The definition of a property within an object.
603 "htmlPropertyOptions": { # Options for html properties.
604 "retrievalImportance": { # Indicates the search quality importance of the tokens within the
605 # field when used for retrieval. Can only be set to DEFAULT or NONE.
606 "importance": "A String", # Indicates the ranking importance given to property when it is matched
607 # during retrieval. Once set, the token importance of a property cannot be
608 # changed.
609 },
610 "operatorOptions": { # 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.
611 # Search operators let users restrict the query to specific fields relevant
612 # to the type of item being searched.
613 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
614 # html property. For example, if operatorName is *subject* and the
615 # property's name is *subjectLine*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700616 # *subject:&amp;lt;value&amp;gt;* show results only where the value of the
617 # property named *subjectLine* matches *&amp;lt;value&amp;gt;*. By contrast, a
618 # search that uses the same *&amp;lt;value&amp;gt;* without an operator return
619 # all items where *&amp;lt;value&amp;gt;* matches the value of any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700620 # html properties or text within the content field for the item.
621 # The operator name can only contain lowercase letters (a-z).
622 # The maximum length is 32 characters.
623 },
624 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700625 "isWildcardSearchable": True or False, # Indicates that users can perform wildcard search for this
626 # property. Only supported for Text properties. IsReturnable must be true to
627 # set this option. In a given datasource maximum of 5 properties can be
628 # marked as is_wildcard_searchable.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 "textPropertyOptions": { # Options for text properties.
630 "retrievalImportance": { # Indicates the search quality importance of the tokens within the
631 # field when used for retrieval.
632 "importance": "A String", # Indicates the ranking importance given to property when it is matched
633 # during retrieval. Once set, the token importance of a property cannot be
634 # changed.
635 },
636 "operatorOptions": { # 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.
637 # Search operators let users restrict the query to specific fields relevant
638 # to the type of item being searched.
Dan O'Mearadd494642020-05-01 07:42:23 -0700639 "exactMatchWithOperator": True or False, # If true, the text value is tokenized as one atomic value in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700640 # operator searches and facet matches. For example, if the operator name is
641 # "genre" and the value is "science-fiction" the query restrictions
Dan O'Mearadd494642020-05-01 07:42:23 -0700642 # "genre:science" and "genre:fiction" doesn't match the item;
643 # "genre:science-fiction" does. Value matching is case-sensitive
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700644 # and does not remove special characters.
Dan O'Mearadd494642020-05-01 07:42:23 -0700645 # If false, the text is tokenized. For example, if the value is
646 # "science-fiction" the queries "genre:science" and "genre:fiction"
647 # matches the item.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700648 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
649 # text property. For example, if operatorName is *subject* and the
650 # property's name is *subjectLine*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700651 # *subject:&amp;lt;value&amp;gt;* show results only where the value of the
652 # property named *subjectLine* matches *&amp;lt;value&amp;gt;*. By contrast, a
653 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
654 # all items where *&amp;lt;value&amp;gt;* matches the value of any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700655 # text properties or text within the content field for the item.
656 # The operator name can only contain lowercase letters (a-z).
657 # The maximum length is 32 characters.
658 },
659 },
660 "name": "A String", # The name of the property. Item indexing requests sent to the Indexing API
661 # should set the property name
662 # equal to this value. For example, if name is *subject_line*, then indexing
663 # requests for document items with subject fields should set the
664 # name for that field equal to
665 # *subject_line*. Use the name as the identifier for the object property.
666 # Once registered as a property for an object, you cannot re-use this name
667 # for another property within that object.
668 # The name must start with a letter and can only contain letters (A-Z, a-z)
669 # or numbers (0-9).
670 # The maximum length is 256 characters.
671 "enumPropertyOptions": { # Options for enum properties, which allow you to define a restricted set of
672 # strings to match user queries, set rankings for those string values, and
673 # define an operator name to be paired with those strings so that users can
674 # narrow results to only items with a specific value. For example, for items in
675 # a request tracking system with priority information, you could define *p0* as
676 # an allowable enum value and tie this enum to the operator name *priority* so
677 # that search users could add *priority:p0* to their query to restrict the set
678 # of results to only those items indexed with the value *p0*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700679 "possibleValues": [ # The list of possible values for the enumeration property. All
680 # EnumValuePairs must provide a string value. If you specify an integer value
681 # for one EnumValuePair, then all possible EnumValuePairs must provide an
682 # integer value. Both the string value and integer value must be unique over
683 # all possible values. Once set, possible values cannot be removed or
684 # modified. If you supply an ordered ranking and think you might insert
685 # additional enum values in the future, leave gaps in the initial integer
686 # values to allow adding a value in between previously registered values.
687 # The maximum number of elements is 100.
688 { # The enumeration value pair defines two things: a required string value and
689 # an optional integer value. The string value defines the necessary query
690 # term required to retrieve that item, such as *p0* for a priority item.
691 # The integer value determines the ranking of that string value relative
692 # to other enumerated values for the same property. For example, you might
693 # associate *p0* with *0* and define another enum pair such as *p1* and *1*.
694 # You must use the integer value in combination with
695 # ordered
696 # ranking to
697 # set the ranking of a given value relative to other enumerated values for
698 # the same property name. Here, a ranking order of DESCENDING for *priority*
699 # properties results in a ranking boost for items indexed with a value of
700 # *p0* compared to items indexed with a value of *p1*. Without a specified
701 # ranking order, the integer value has no effect on item ranking.
702 "stringValue": "A String", # The string value of the EnumValuePair.
703 # The maximum length is 32 characters.
704 "integerValue": 42, # The integer value of the EnumValuePair which must be non-negative.
705 # Optional.
706 },
707 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700708 "operatorOptions": { # Used to provide a search operator for enum properties. This is # If set, describes how the enum should be used as a search operator.
709 # optional. Search operators let users restrict the query to specific fields
710 # relevant to the type of item being searched. For example, if you provide no
711 # operator for a *priority* enum property with possible values *p0* and *p1*,
712 # a query that contains the term *p0* returns items that have *p0* as the
713 # value of the *priority* property, as well as any items that contain the
714 # string *p0* in other fields. If you provide an operator name for the enum,
715 # such as *priority*, then search users can use that operator to refine
716 # results to only items that have *p0* as this property's value, with the
717 # query *priority:p0*.
718 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
719 # enum property. For example, if operatorName is *priority* and the
720 # property's name is *priorityVal*, then queries like
721 # *priority:&amp;lt;value&amp;gt;* show results only where the value of the
722 # property named *priorityVal* matches *&amp;lt;value&amp;gt;*. By contrast, a
723 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
724 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
725 # properties or text within the content field for the item.
726 # The operator name can only contain lowercase letters (a-z).
727 # The maximum length is 32 characters.
728 },
729 "orderedRanking": "A String", # Used to specify the ordered ranking for the enumeration that determines how
730 # the integer values provided in the possible EnumValuePairs are used to rank
731 # results. If specified, integer values must be provided for all possible
732 # EnumValuePair values given for this property. Can only be used if
733 # isRepeatable
734 # is false.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700735 },
736 "isReturnable": True or False, # Indicates that the property identifies data that should be returned in
737 # search results via the Query API. If set to *true*, indicates that Query
738 # API users can use matching property fields in results. However, storing
739 # fields requires more space allocation and uses more bandwidth for search
740 # queries, which impacts performance over large datasets. Set to *true* here
741 # only if the field is needed for search results. Cannot be true for
742 # properties whose type is an object.
Dan O'Mearadd494642020-05-01 07:42:23 -0700743 "isRepeatable": True or False, # Indicates that multiple values are allowed for the property. For example, a
744 # document only has one description but can have multiple comments. Cannot be
745 # true for properties whose type is a boolean.
746 # If set to false, properties that contain more than one value cause the
747 # indexing request for that item to be rejected.
748 "doublePropertyOptions": { # Options for double properties.
749 "operatorOptions": { # Used to provide a search operator for double properties. This is # If set, describes how the double should be used as a search operator.
750 # optional. Search operators let users restrict the query to specific fields
751 # relevant to the type of item being searched.
752 "operatorName": "A String", # Indicates the operator name required in the query in order to use the
753 # double property in sorting or as a facet.
754 # The operator name can only contain lowercase letters (a-z).
755 # The maximum length is 32 characters.
756 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700757 },
758 "timestampPropertyOptions": { # Options for timestamp properties.
759 "operatorOptions": { # Used to provide a search operator for timestamp properties. This is # If set, describes how the timestamp should be used as a search operator.
760 # optional. Search operators let users restrict the query to specific fields
761 # relevant to the type of item being searched.
762 "lessThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
763 # timestamp property using the less-than operator. For example, if
764 # lessThanOperatorName is *closedbefore* and the property's name is
Dan O'Mearadd494642020-05-01 07:42:23 -0700765 # *closeDate*, then queries like *closedbefore:&amp;lt;value&amp;gt;*
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700766 # show results only where the value of the property named *closeDate* is
Dan O'Mearadd494642020-05-01 07:42:23 -0700767 # earlier than *&amp;lt;value&amp;gt;*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700768 # The operator name can only contain lowercase letters (a-z).
769 # The maximum length is 32 characters.
770 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
771 # timestamp property. For example, if operatorName is *closedon* and the
772 # property's name is *closeDate*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700773 # *closedon:&amp;lt;value&amp;gt;* show results only where the value of the
774 # property named *closeDate* matches *&amp;lt;value&amp;gt;*. By contrast, a
775 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
776 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700777 # properties or text within the content field for the item. The operator
778 # name can only contain lowercase letters (a-z). The maximum length is 32
779 # characters.
780 "greaterThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
781 # timestamp property using the greater-than operator. For example, if
782 # greaterThanOperatorName is *closedafter* and the property's name is
Dan O'Mearadd494642020-05-01 07:42:23 -0700783 # *closeDate*, then queries like *closedafter:&amp;lt;value&amp;gt;*
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700784 # show results only where the value of the property named *closeDate* is
Dan O'Mearadd494642020-05-01 07:42:23 -0700785 # later than *&amp;lt;value&amp;gt;*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 # The operator name can only contain lowercase letters (a-z).
787 # The maximum length is 32 characters.
788 },
789 },
790 "datePropertyOptions": { # Options for date properties.
791 "operatorOptions": { # Optional. Provides a search operator for date properties. # If set, describes how the date should be used as a search operator.
792 # Search operators let users restrict the query to specific fields relevant
793 # to the type of item being searched.
794 "lessThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
795 # date property using the less-than operator. For example, if
796 # lessThanOperatorName is *closedbefore* and the property's name is
Dan O'Mearadd494642020-05-01 07:42:23 -0700797 # *closeDate*, then queries like *closedbefore:&amp;lt;value&amp;gt;*
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700798 # show results only where the value of the property named *closeDate* is
Dan O'Mearadd494642020-05-01 07:42:23 -0700799 # earlier than *&amp;lt;value&amp;gt;*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700800 # The operator name can only contain lowercase letters (a-z).
801 # The maximum length is 32 characters.
802 "operatorName": "A String", # Indicates the actual string required in the query in order to isolate the
803 # date property. For example, suppose an issue tracking schema object
804 # has a property named *closeDate* that specifies an operator with an
805 # operatorName of *closedon*. For searches on that data, queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700806 # *closedon:&amp;lt;value&amp;gt;* show results only where the value of the
807 # *closeDate* property matches *&amp;lt;value&amp;gt;*. By contrast, a
808 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
809 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700810 # properties or text within the content field for the indexed datasource.
811 # The operator name can only contain lowercase letters (a-z).
812 # The maximum length is 32 characters.
813 "greaterThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
814 # date property using the greater-than operator. For example, if
815 # greaterThanOperatorName is *closedafter* and the property's name is
Dan O'Mearadd494642020-05-01 07:42:23 -0700816 # *closeDate*, then queries like *closedafter:&amp;lt;value&amp;gt;*
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700817 # show results only where the value of the property named *closeDate* is
Dan O'Mearadd494642020-05-01 07:42:23 -0700818 # later than *&amp;lt;value&amp;gt;*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700819 # The operator name can only contain lowercase letters (a-z).
820 # The maximum length is 32 characters.
821 },
822 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700823 "isSortable": True or False, # Indicates that the property can be used for sorting. Cannot be true for
824 # properties that are repeatable. Cannot be true for properties whose type
825 # is object or user identifier. IsReturnable must be true to set this option.
826 # Only supported for Boolean, Date, Double, Integer, and Timestamp
827 # properties.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828 "booleanPropertyOptions": { # Options for boolean properties.
829 "operatorOptions": { # Used to provide a search operator for boolean properties. This is # If set, describes how the boolean should be used as a search operator.
830 # optional. Search operators let users restrict the query to specific fields
831 # relevant to the type of item being searched.
832 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
833 # boolean property. For example, if operatorName is *closed* and the
834 # property's name is *isClosed*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700835 # *closed:&amp;lt;value&amp;gt;* show results only where the value of the
836 # property named *isClosed* matches *&amp;lt;value&amp;gt;*. By contrast, a
837 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
838 # all items where *&amp;lt;value&amp;gt;* matches the value of any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839 # String properties or text within the content field for the item.
840 # The operator name can only contain lowercase letters (a-z).
841 # The maximum length is 32 characters.
842 },
843 },
844 "isFacetable": True or False, # Indicates that the property can be used for generating facets. Cannot be
845 # true for properties whose type is object. IsReturnable must be true to set
846 # this option.
847 # Only supported for Boolean, Enum, and Text properties.
Dan O'Mearadd494642020-05-01 07:42:23 -0700848 "isSuggestable": True or False, # Indicates that the property can be used for generating query suggestions.
849 "objectPropertyOptions": { # Options for object properties.
850 "subobjectProperties": [ # The properties of the sub-object. These properties represent a nested
851 # object. For example, if this property represents a postal address, the
852 # subobjectProperties might be named *street*, *city*, and *state*.
853 # The maximum number of elements is 1000.
854 # Object with schema name: PropertyDefinition
855 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700856 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700857 "displayOptions": { # The display options for a property. # Options that determine how the property is displayed in the Cloud Search
858 # results page if it is specified to be displayed in the object's
859 # display options
860 # .
861 "displayLabel": "A String", # The user friendly label for the property that is used if the property
862 # is specified to be displayed in ObjectDisplayOptions. If provided, the
863 # display label is shown in front of the property values when the property is
864 # part of the object display options. For example, if the property value is
865 # '1', the value by itself may not be useful context for the user. If the
866 # display name given was 'priority', then the user sees 'priority : 1' in
867 # the search results which provides clear context to search users. This is
868 # OPTIONAL; if not given, only the property values are displayed.
869 # The maximum length is 32 characters.
870 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700871 "integerPropertyOptions": { # Options for integer properties.
872 "orderedRanking": "A String", # Used to specify the ordered ranking for the integer. Can only be used if
873 # isRepeatable
874 # is false.
875 "minimumValue": "A String", # The minimum value of the property. The minimum and maximum values for the
876 # property are used to rank results according to the
877 # ordered ranking.
878 # Indexing requests with values less than the minimum are accepted and
879 # ranked with the same weight as items indexed with the minimum value.
880 "operatorOptions": { # Used to provide a search operator for integer properties. This is # If set, describes how the integer should be used as a search operator.
881 # optional. Search operators let users restrict the query to specific fields
882 # relevant to the type of item being searched.
883 "lessThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
884 # integer property using the less-than operator. For example, if
885 # lessThanOperatorName is *prioritybelow* and the property's name is
Dan O'Mearadd494642020-05-01 07:42:23 -0700886 # *priorityVal*, then queries like *prioritybelow:&amp;lt;value&amp;gt;*
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700887 # show results only where the value of the property named *priorityVal* is
Dan O'Mearadd494642020-05-01 07:42:23 -0700888 # less than *&amp;lt;value&amp;gt;*.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700889 # The operator name can only contain lowercase letters (a-z).
890 # The maximum length is 32 characters.
891 "operatorName": "A String", # Indicates the operator name required in the query in order to isolate the
892 # integer property. For example, if operatorName is *priority* and the
893 # property's name is *priorityVal*, then queries like
Dan O'Mearadd494642020-05-01 07:42:23 -0700894 # *priority:&amp;lt;value&amp;gt;* show results only where the value of the
895 # property named *priorityVal* matches *&amp;lt;value&amp;gt;*. By contrast, a
896 # search that uses the same *&amp;lt;value&amp;gt;* without an operator returns
897 # all items where *&amp;lt;value&amp;gt;* matches the value of any String
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700898 # properties or text within the content field for the item.
899 # The operator name can only contain lowercase letters (a-z).
900 # The maximum length is 32 characters.
Dan O'Mearadd494642020-05-01 07:42:23 -0700901 "greaterThanOperatorName": "A String", # Indicates the operator name required in the query in order to isolate the
902 # integer property using the greater-than operator. For example, if
903 # greaterThanOperatorName is *priorityabove* and the property's name is
904 # *priorityVal*, then queries like *priorityabove:&amp;lt;value&amp;gt;*
905 # show results only where the value of the property named *priorityVal* is
906 # greater than *&amp;lt;value&amp;gt;*.
907 # The operator name can only contain lowercase letters (a-z).
908 # The maximum length is 32 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700909 },
910 "maximumValue": "A String", # The maximum value of the property. The minimum and maximum values for the
911 # property are used to rank results according to the
912 # ordered ranking.
913 # Indexing requests with values greater than the maximum are accepted and
914 # ranked with the same weight as items indexed with the maximum value.
915 },
916 },
917 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700918 "options": { # The options for an object. # The optional object-specific options.
919 "freshnessOptions": { # Indicates which freshness property to use when adjusting search ranking for # The freshness options for an object.
920 # an item. Fresher, more recent dates indicate higher quality. Use the
921 # freshness option property that best works with your data. For fileshare
922 # documents, last modified time is most relevant. For calendar event data,
923 # the time when the event occurs is a more relevant freshness indicator. In
924 # this way, calendar events that occur closer to the time of the search query
925 # are considered higher quality and ranked accordingly.
926 "freshnessDuration": "A String", # The duration after which an object should be considered
927 # stale. The default value is 180 days (in seconds).
928 "freshnessProperty": "A String", # This property indicates the freshness level of the object in the index.
929 # If set, this property must be a top-level property within the
930 # property definitions
931 # and it must be a
932 # timestamp type
933 # or
934 # date type.
935 # Otherwise, the Indexing API uses
936 # updateTime
937 # as the freshness indicator.
938 # The maximum length is 256 characters.
939 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700940 # When a property is used to calculate freshness, the value defaults
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700941 # to 2 years from the current time.
942 },
943 "displayOptions": { # The display options for an object. # Options that determine how the object is displayed in the Cloud Search
944 # results page.
Dan O'Mearadd494642020-05-01 07:42:23 -0700945 "metalines": [ # Defines the properties that are displayed in the metalines of the
946 # search results. The property values are displayed in the order given
947 # here. If a property holds multiple values, all of the values are
948 # displayed before the next properties. For this reason, it is a good
949 # practice to specify singular properties before repeated properties in this
950 # list. All of the properties must set
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700951 # is_returnable
952 # to true. The maximum number of metalines is 3.
953 { # A metaline is a list of properties that are displayed along with the search
954 # result to provide context.
Dan O'Mearadd494642020-05-01 07:42:23 -0700955 "properties": [ # The list of displayed properties for the metaline. The maximum number of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700956 # properties is 5.
957 { # A reference to a top-level property within the object that should be
Dan O'Mearadd494642020-05-01 07:42:23 -0700958 # displayed in search results. The values of the chosen properties is
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700959 # displayed in the search results along with the
Dan O'Mearadd494642020-05-01 07:42:23 -0700960 # display label
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700961 # for that property if one is specified. If a display label is not specified,
Dan O'Mearadd494642020-05-01 07:42:23 -0700962 # only the values is shown.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700963 "propertyName": "A String", # The name of the top-level property as defined in a property definition
964 # for the object. If the name is not a defined property in the schema, an
Dan O'Mearadd494642020-05-01 07:42:23 -0700965 # error is given when attempting to update the schema.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700966 },
967 ],
968 },
969 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700970 "objectDisplayLabel": "A String", # The user friendly label to display in the search result to indicate the
971 # type of the item. This is OPTIONAL; if not provided, an object label isn't
972 # displayed on the context line of the search results. The maximum length
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700973 # is 32 characters.
974 },
975 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700976 "name": "A String", # Name for the object, which then defines its type. Item indexing requests
977 # should set the
978 # objectType field
979 # equal to this value. For example, if *name* is *Document*, then indexing
980 # requests for items of type Document should set
981 # objectType equal to
982 # *Document*. Each object definition must be uniquely named within a schema.
983 # The name must start with a letter and can only contain letters (A-Z, a-z)
984 # or numbers (0-9).
985 # The maximum length is 256 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700986 },
987 ],
988 "operationIds": [ # IDs of the Long Running Operations (LROs) currently running for this
989 # schema. After modifying the schema, wait for operations to complete
990 # before indexing additional content.
991 "A String",
992 ],
993 },
994 }
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.
1006 "metadata": { # Service-specific metadata associated with the operation. It typically
1007 # contains progress information and common metadata such as create time.
1008 # Some services might not provide such metadata. Any method that returns a
1009 # long-running operation should document the metadata type, if any.
1010 "a_key": "", # Properties of the object. Contains field @type with type URL.
1011 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001012 "done": True or False, # If the value is `false`, it means the operation is still in progress.
1013 # If `true`, the operation is completed, and either `error` or `response` is
1014 # available.
1015 "response": { # The normal response of the operation in case of success. If the original
1016 # method returns no data on success, such as `Delete`, the response is
1017 # `google.protobuf.Empty`. If the original method is standard
1018 # `Get`/`Create`/`Update`, the response should be the resource. For other
1019 # methods, the response should have the type `XxxResponse`, where `Xxx`
1020 # is the original method name. For example, if the original method name
1021 # is `TakeSnapshot()`, the inferred response type is
1022 # `TakeSnapshotResponse`.
1023 "a_key": "", # Properties of the object. Contains field @type with type URL.
1024 },
1025 "name": "A String", # The server-assigned name, which is only unique within the same service that
1026 # originally returns it. If you use the default HTTP mapping, the
1027 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001028 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
1029 # different programming environments, including REST APIs and RPC APIs. It is
1030 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1031 # three pieces of data: error code, error message, and error details.
1032 #
1033 # You can find out more about this error model and how to work with it in the
1034 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1035 "message": "A String", # 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.
1038 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
1039 "details": [ # A list of messages that carry the error details. There is a common set of
1040 # message types for APIs to use.
1041 {
1042 "a_key": "", # Properties of the object. Contains field @type with type URL.
1043 },
1044 ],
1045 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001046 }</pre>
1047</div>
1048
1049</body></html>