Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="cloudsearch_v1.html">Cloud Search API</a> . <a href="cloudsearch_v1.settings.html">settings</a> . <a href="cloudsearch_v1.settings.searchapplications.html">searchapplications</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 78 | <code><a href="#create">create(body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 79 | <p class="firstline">Creates a search application.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#delete">delete(name, debugOptions_enableDebugging=None, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Deletes a search application.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#get">get(name, debugOptions_enableDebugging=None, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Gets the specified search application.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#list">list(pageSize=None, debugOptions_enableDebugging=None, pageToken=None, x__xgafv=None)</a></code></p> |
| 88 | <p class="firstline">Lists all search applications.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 91 | <p class="firstline">Retrieves the next page of results.</p> |
| 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 93 | <code><a href="#reset">reset(name, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <p class="firstline">Resets a search application to default settings. This will return an empty</p> |
| 95 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 96 | <code><a href="#update">update(name, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <p class="firstline">Updates a search application.</p> |
| 98 | <h3>Method Details</h3> |
| 99 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 100 | <code class="details" id="create">create(body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 101 | <pre>Creates a search application. |
| 102 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 103 | **Note:** This API requires an admin account to execute. |
| 104 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 105 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 106 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 107 | The object takes the form of: |
| 108 | |
| 109 | { # SearchApplication |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 110 | "sourceConfig": [ # Configuration for a sources specified in data_source_restrictions. |
| 111 | { # Configurations for a source while processing a |
| 112 | # Search or |
| 113 | # Suggest request. |
| 114 | "scoringConfig": { # Set the scoring configuration. This allows modifying the ranking of results # The scoring configuration for the source. |
| 115 | # for a source. |
| 116 | "sourceImportance": "A String", # Importance of the source. |
| 117 | }, |
| 118 | "source": { # Defines sources for the suggest/search APIs. # The source for which this configuration is to be used. |
| 119 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 120 | "name": "A String", # Source name for content indexed by the |
| 121 | # Indexing API. |
| 122 | }, |
| 123 | "crowdingConfig": { # Set search results crowding limits. Crowding is a situation in which # The crowding configuration for the source. |
| 124 | # multiple results from the same source or host "crowd out" other results, |
| 125 | # diminishing the quality of search for users. To foster better search quality |
| 126 | # and source diversity in search results, you can set a condition to reduce |
| 127 | # repetitive results by source. |
| 128 | "numResults": 42, # Maximum number of results allowed from a source. |
| 129 | # No limits will be set on results if this value is less than or equal to 0. |
| 130 | "numSuggestions": 42, # Maximum number of suggestions allowed from a source. |
| 131 | # No limits will be set on results if this value is less than or equal to 0. |
| 132 | }, |
| 133 | }, |
| 134 | ], |
| 135 | "scoringConfig": { # Scoring configurations for a source while processing a # Configuration for ranking results. |
| 136 | # Search or |
| 137 | # Suggest request. |
| 138 | "disableFreshness": True or False, # Whether to use freshness as a ranking signal. By default, freshness is used |
| 139 | # as a ranking signal. Note that this setting is not available in the Admin |
| 140 | # UI. |
| 141 | "disablePersonalization": True or False, # Whether to personalize the results. By default, personal signals will |
| 142 | # be used to boost results. |
| 143 | }, |
| 144 | "displayName": "A String", # Display name of the Search Application. |
| 145 | # The maximum length is 300 characters. |
| 146 | "name": "A String", # Name of the Search Application. |
| 147 | # <br />Format: searchapplications/{application_id}. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 148 | "dataSourceRestrictions": [ # Retrictions applied to the configurations. |
| 149 | # The maximum number of elements is 10. |
| 150 | { # Restriction on Datasource. |
| 151 | "filterOptions": [ # Filter options restricting the results. If multiple filters |
| 152 | # are present, they are grouped by object type before joining. |
| 153 | # Filters with the same object type are joined conjunctively, then |
| 154 | # the resulting expressions are joined disjunctively. |
| 155 | # |
| 156 | # The maximum number of elements is 20. |
| 157 | # |
| 158 | # NOTE: Suggest API supports only few filters at the moment: |
| 159 | # "objecttype", "type" and "mimetype". |
| 160 | # For now, schema specific filters cannot be used to filter suggestions. |
| 161 | { # Filter options to be applied on query. |
| 162 | "filter": { # A generic way of expressing filters in a query, which supports two # Generic filter to restrict the search, such as `lang:en`, `site:xyz`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 163 | # approaches: <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 164 | # **1. Setting a ValueFilter.** The name must match an operator_name defined in |
| 165 | # the schema for your data source. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 166 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 167 | # **2. Setting a CompositeFilter.** The filters are evaluated |
| 168 | # using the logical operator. The top-level operators can only be either an AND |
| 169 | # or a NOT. AND can appear only at the top-most level. OR can appear only under |
| 170 | # a top-level AND. |
| 171 | "compositeFilter": { |
| 172 | "subFilters": [ # Sub filters. |
| 173 | # Object with schema name: Filter |
| 174 | ], |
| 175 | "logicOperator": "A String", # The logic operator of the sub filter. |
| 176 | }, |
| 177 | "valueFilter": { |
| 178 | "operatorName": "A String", # The `operator_name` applied to the query, such as *price_greater_than*. |
| 179 | # The filter can work against both types of filters defined in the schema |
| 180 | # for your data source: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 181 | # <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 182 | # 1. `operator_name`, where the query filters results by the property |
| 183 | # that matches the value. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 184 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 185 | # 2. `greater_than_operator_name` or `less_than_operator_name` in your |
| 186 | # schema. The query filters the results for the property values that are |
| 187 | # greater than or less than the supplied value in the query. |
| 188 | "value": { # Definition of a single value with generic type. # The value to be compared with. |
| 189 | "timestampValue": "A String", |
| 190 | "doubleValue": 3.14, |
| 191 | "dateValue": { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 192 | "year": 42, # Year of date. Must be from 1 to 9999. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 193 | "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. |
| 194 | "month": 42, # Month of date. Must be from 1 to 12. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 195 | }, |
| 196 | "stringValue": "A String", |
| 197 | "booleanValue": True or False, |
| 198 | "integerValue": "A String", |
| 199 | }, |
| 200 | }, |
| 201 | }, |
| 202 | "objectType": "A String", # If object_type is set, only objects of that type are returned. This should |
| 203 | # correspond to the name of the object that was registered within the |
| 204 | # definition of schema. The maximum length is 256 characters. |
| 205 | }, |
| 206 | ], |
| 207 | "source": { # Defines sources for the suggest/search APIs. # The source of restriction. |
| 208 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 209 | "name": "A String", # Source name for content indexed by the |
| 210 | # Indexing API. |
| 211 | }, |
| 212 | }, |
| 213 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 214 | "operationIds": [ # Output only. IDs of the Long Running Operations (LROs) currently running for this |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 215 | # schema. Output only field. |
| 216 | "A String", |
| 217 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 218 | "defaultSortOptions": { # The default options for sorting the search results |
| 219 | "operatorName": "A String", # Name of the operator corresponding to the field to sort on. |
| 220 | # The corresponding property must be marked as |
| 221 | # sortable. |
| 222 | "sortOrder": "A String", # Ascending is the default sort order |
| 223 | }, |
| 224 | "defaultFacetOptions": [ # The default fields for returning facet results. |
| 225 | # The sources specified here also have been included in |
| 226 | # data_source_restrictions |
| 227 | # above. |
| 228 | { # Specifies operators to return facet results for. There will be one |
| 229 | # FacetResult for every source_name/object_type/operator_name combination. |
| 230 | "sourceName": "A String", # Source name to facet on. Format: datasources/{source_id} |
| 231 | # If empty, all data sources will be used. |
| 232 | "numFacetBuckets": 42, # Maximum number of facet buckets that should be returned for this facet. |
| 233 | # Defaults to 10. |
| 234 | # Maximum value is 100. |
| 235 | "operatorName": "A String", # Name of the operator chosen for faceting. @see |
| 236 | # cloudsearch.SchemaPropertyOptions |
| 237 | "objectType": "A String", # If object_type is set, only those objects of that type will be used to |
| 238 | # compute facets. If empty, then all objects will be used to compute facets. |
| 239 | }, |
| 240 | ], |
| 241 | } |
| 242 | |
| 243 | x__xgafv: string, V1 error format. |
| 244 | Allowed values |
| 245 | 1 - v1 error format |
| 246 | 2 - v2 error format |
| 247 | |
| 248 | Returns: |
| 249 | An object of the form: |
| 250 | |
| 251 | { # This resource represents a long-running operation that is the result of a |
| 252 | # network API call. |
| 253 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 254 | # contains progress information and common metadata such as create time. |
| 255 | # Some services might not provide such metadata. Any method that returns a |
| 256 | # long-running operation should document the metadata type, if any. |
| 257 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 258 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 259 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 260 | # If `true`, the operation is completed, and either `error` or `response` is |
| 261 | # available. |
| 262 | "response": { # The normal response of the operation in case of success. If the original |
| 263 | # method returns no data on success, such as `Delete`, the response is |
| 264 | # `google.protobuf.Empty`. If the original method is standard |
| 265 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 266 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 267 | # is the original method name. For example, if the original method name |
| 268 | # is `TakeSnapshot()`, the inferred response type is |
| 269 | # `TakeSnapshotResponse`. |
| 270 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 271 | }, |
| 272 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 273 | # originally returns it. If you use the default HTTP mapping, the |
| 274 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 275 | "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. |
| 276 | # different programming environments, including REST APIs and RPC APIs. It is |
| 277 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 278 | # three pieces of data: error code, error message, and error details. |
| 279 | # |
| 280 | # You can find out more about this error model and how to work with it in the |
| 281 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 282 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 283 | # user-facing error message should be localized and sent in the |
| 284 | # google.rpc.Status.details field, or localized by the client. |
| 285 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 286 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 287 | # message types for APIs to use. |
| 288 | { |
| 289 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 290 | }, |
| 291 | ], |
| 292 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 293 | }</pre> |
| 294 | </div> |
| 295 | |
| 296 | <div class="method"> |
| 297 | <code class="details" id="delete">delete(name, debugOptions_enableDebugging=None, x__xgafv=None)</code> |
| 298 | <pre>Deletes a search application. |
| 299 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 300 | **Note:** This API requires an admin account to execute. |
| 301 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 302 | Args: |
| 303 | name: string, The name of the search application to be deleted. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 304 | <br />Format: applications/{application_id}. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 305 | debugOptions_enableDebugging: boolean, If you are asked by Google to help with debugging, set this field. |
| 306 | Otherwise, ignore this field. |
| 307 | x__xgafv: string, V1 error format. |
| 308 | Allowed values |
| 309 | 1 - v1 error format |
| 310 | 2 - v2 error format |
| 311 | |
| 312 | Returns: |
| 313 | An object of the form: |
| 314 | |
| 315 | { # This resource represents a long-running operation that is the result of a |
| 316 | # network API call. |
| 317 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 318 | # contains progress information and common metadata such as create time. |
| 319 | # Some services might not provide such metadata. Any method that returns a |
| 320 | # long-running operation should document the metadata type, if any. |
| 321 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 322 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 323 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 324 | # If `true`, the operation is completed, and either `error` or `response` is |
| 325 | # available. |
| 326 | "response": { # The normal response of the operation in case of success. If the original |
| 327 | # method returns no data on success, such as `Delete`, the response is |
| 328 | # `google.protobuf.Empty`. If the original method is standard |
| 329 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 330 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 331 | # is the original method name. For example, if the original method name |
| 332 | # is `TakeSnapshot()`, the inferred response type is |
| 333 | # `TakeSnapshotResponse`. |
| 334 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 335 | }, |
| 336 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 337 | # originally returns it. If you use the default HTTP mapping, the |
| 338 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 339 | "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. |
| 340 | # different programming environments, including REST APIs and RPC APIs. It is |
| 341 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 342 | # three pieces of data: error code, error message, and error details. |
| 343 | # |
| 344 | # You can find out more about this error model and how to work with it in the |
| 345 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 346 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 347 | # user-facing error message should be localized and sent in the |
| 348 | # google.rpc.Status.details field, or localized by the client. |
| 349 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 350 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 351 | # message types for APIs to use. |
| 352 | { |
| 353 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 354 | }, |
| 355 | ], |
| 356 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 357 | }</pre> |
| 358 | </div> |
| 359 | |
| 360 | <div class="method"> |
| 361 | <code class="details" id="get">get(name, debugOptions_enableDebugging=None, x__xgafv=None)</code> |
| 362 | <pre>Gets the specified search application. |
| 363 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 364 | **Note:** This API requires an admin account to execute. |
| 365 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 366 | Args: |
| 367 | name: string, Name of the search application. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 368 | <br />Format: applications/{application_id}. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 369 | debugOptions_enableDebugging: boolean, If you are asked by Google to help with debugging, set this field. |
| 370 | Otherwise, ignore this field. |
| 371 | x__xgafv: string, V1 error format. |
| 372 | Allowed values |
| 373 | 1 - v1 error format |
| 374 | 2 - v2 error format |
| 375 | |
| 376 | Returns: |
| 377 | An object of the form: |
| 378 | |
| 379 | { # SearchApplication |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 380 | "sourceConfig": [ # Configuration for a sources specified in data_source_restrictions. |
| 381 | { # Configurations for a source while processing a |
| 382 | # Search or |
| 383 | # Suggest request. |
| 384 | "scoringConfig": { # Set the scoring configuration. This allows modifying the ranking of results # The scoring configuration for the source. |
| 385 | # for a source. |
| 386 | "sourceImportance": "A String", # Importance of the source. |
| 387 | }, |
| 388 | "source": { # Defines sources for the suggest/search APIs. # The source for which this configuration is to be used. |
| 389 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 390 | "name": "A String", # Source name for content indexed by the |
| 391 | # Indexing API. |
| 392 | }, |
| 393 | "crowdingConfig": { # Set search results crowding limits. Crowding is a situation in which # The crowding configuration for the source. |
| 394 | # multiple results from the same source or host "crowd out" other results, |
| 395 | # diminishing the quality of search for users. To foster better search quality |
| 396 | # and source diversity in search results, you can set a condition to reduce |
| 397 | # repetitive results by source. |
| 398 | "numResults": 42, # Maximum number of results allowed from a source. |
| 399 | # No limits will be set on results if this value is less than or equal to 0. |
| 400 | "numSuggestions": 42, # Maximum number of suggestions allowed from a source. |
| 401 | # No limits will be set on results if this value is less than or equal to 0. |
| 402 | }, |
| 403 | }, |
| 404 | ], |
| 405 | "scoringConfig": { # Scoring configurations for a source while processing a # Configuration for ranking results. |
| 406 | # Search or |
| 407 | # Suggest request. |
| 408 | "disableFreshness": True or False, # Whether to use freshness as a ranking signal. By default, freshness is used |
| 409 | # as a ranking signal. Note that this setting is not available in the Admin |
| 410 | # UI. |
| 411 | "disablePersonalization": True or False, # Whether to personalize the results. By default, personal signals will |
| 412 | # be used to boost results. |
| 413 | }, |
| 414 | "displayName": "A String", # Display name of the Search Application. |
| 415 | # The maximum length is 300 characters. |
| 416 | "name": "A String", # Name of the Search Application. |
| 417 | # <br />Format: searchapplications/{application_id}. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 418 | "dataSourceRestrictions": [ # Retrictions applied to the configurations. |
| 419 | # The maximum number of elements is 10. |
| 420 | { # Restriction on Datasource. |
| 421 | "filterOptions": [ # Filter options restricting the results. If multiple filters |
| 422 | # are present, they are grouped by object type before joining. |
| 423 | # Filters with the same object type are joined conjunctively, then |
| 424 | # the resulting expressions are joined disjunctively. |
| 425 | # |
| 426 | # The maximum number of elements is 20. |
| 427 | # |
| 428 | # NOTE: Suggest API supports only few filters at the moment: |
| 429 | # "objecttype", "type" and "mimetype". |
| 430 | # For now, schema specific filters cannot be used to filter suggestions. |
| 431 | { # Filter options to be applied on query. |
| 432 | "filter": { # A generic way of expressing filters in a query, which supports two # Generic filter to restrict the search, such as `lang:en`, `site:xyz`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 433 | # approaches: <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 434 | # **1. Setting a ValueFilter.** The name must match an operator_name defined in |
| 435 | # the schema for your data source. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 436 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 437 | # **2. Setting a CompositeFilter.** The filters are evaluated |
| 438 | # using the logical operator. The top-level operators can only be either an AND |
| 439 | # or a NOT. AND can appear only at the top-most level. OR can appear only under |
| 440 | # a top-level AND. |
| 441 | "compositeFilter": { |
| 442 | "subFilters": [ # Sub filters. |
| 443 | # Object with schema name: Filter |
| 444 | ], |
| 445 | "logicOperator": "A String", # The logic operator of the sub filter. |
| 446 | }, |
| 447 | "valueFilter": { |
| 448 | "operatorName": "A String", # The `operator_name` applied to the query, such as *price_greater_than*. |
| 449 | # The filter can work against both types of filters defined in the schema |
| 450 | # for your data source: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 451 | # <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 452 | # 1. `operator_name`, where the query filters results by the property |
| 453 | # that matches the value. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 454 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 455 | # 2. `greater_than_operator_name` or `less_than_operator_name` in your |
| 456 | # schema. The query filters the results for the property values that are |
| 457 | # greater than or less than the supplied value in the query. |
| 458 | "value": { # Definition of a single value with generic type. # The value to be compared with. |
| 459 | "timestampValue": "A String", |
| 460 | "doubleValue": 3.14, |
| 461 | "dateValue": { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 462 | "year": 42, # Year of date. Must be from 1 to 9999. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 463 | "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. |
| 464 | "month": 42, # Month of date. Must be from 1 to 12. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 465 | }, |
| 466 | "stringValue": "A String", |
| 467 | "booleanValue": True or False, |
| 468 | "integerValue": "A String", |
| 469 | }, |
| 470 | }, |
| 471 | }, |
| 472 | "objectType": "A String", # If object_type is set, only objects of that type are returned. This should |
| 473 | # correspond to the name of the object that was registered within the |
| 474 | # definition of schema. The maximum length is 256 characters. |
| 475 | }, |
| 476 | ], |
| 477 | "source": { # Defines sources for the suggest/search APIs. # The source of restriction. |
| 478 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 479 | "name": "A String", # Source name for content indexed by the |
| 480 | # Indexing API. |
| 481 | }, |
| 482 | }, |
| 483 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 484 | "operationIds": [ # Output only. IDs of the Long Running Operations (LROs) currently running for this |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 485 | # schema. Output only field. |
| 486 | "A String", |
| 487 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 488 | "defaultSortOptions": { # The default options for sorting the search results |
| 489 | "operatorName": "A String", # Name of the operator corresponding to the field to sort on. |
| 490 | # The corresponding property must be marked as |
| 491 | # sortable. |
| 492 | "sortOrder": "A String", # Ascending is the default sort order |
| 493 | }, |
| 494 | "defaultFacetOptions": [ # The default fields for returning facet results. |
| 495 | # The sources specified here also have been included in |
| 496 | # data_source_restrictions |
| 497 | # above. |
| 498 | { # Specifies operators to return facet results for. There will be one |
| 499 | # FacetResult for every source_name/object_type/operator_name combination. |
| 500 | "sourceName": "A String", # Source name to facet on. Format: datasources/{source_id} |
| 501 | # If empty, all data sources will be used. |
| 502 | "numFacetBuckets": 42, # Maximum number of facet buckets that should be returned for this facet. |
| 503 | # Defaults to 10. |
| 504 | # Maximum value is 100. |
| 505 | "operatorName": "A String", # Name of the operator chosen for faceting. @see |
| 506 | # cloudsearch.SchemaPropertyOptions |
| 507 | "objectType": "A String", # If object_type is set, only those objects of that type will be used to |
| 508 | # compute facets. If empty, then all objects will be used to compute facets. |
| 509 | }, |
| 510 | ], |
| 511 | }</pre> |
| 512 | </div> |
| 513 | |
| 514 | <div class="method"> |
| 515 | <code class="details" id="list">list(pageSize=None, debugOptions_enableDebugging=None, pageToken=None, x__xgafv=None)</code> |
| 516 | <pre>Lists all search applications. |
| 517 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 518 | **Note:** This API requires an admin account to execute. |
| 519 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 520 | Args: |
| 521 | pageSize: integer, The maximum number of items to return. |
| 522 | debugOptions_enableDebugging: boolean, If you are asked by Google to help with debugging, set this field. |
| 523 | Otherwise, ignore this field. |
| 524 | pageToken: string, The next_page_token value returned from a previous List request, if any. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 525 | <br/> The default value is 10 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 526 | x__xgafv: string, V1 error format. |
| 527 | Allowed values |
| 528 | 1 - v1 error format |
| 529 | 2 - v2 error format |
| 530 | |
| 531 | Returns: |
| 532 | An object of the form: |
| 533 | |
| 534 | { |
| 535 | "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no |
| 536 | # more results in the list. |
| 537 | "searchApplications": [ |
| 538 | { # SearchApplication |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 539 | "sourceConfig": [ # Configuration for a sources specified in data_source_restrictions. |
| 540 | { # Configurations for a source while processing a |
| 541 | # Search or |
| 542 | # Suggest request. |
| 543 | "scoringConfig": { # Set the scoring configuration. This allows modifying the ranking of results # The scoring configuration for the source. |
| 544 | # for a source. |
| 545 | "sourceImportance": "A String", # Importance of the source. |
| 546 | }, |
| 547 | "source": { # Defines sources for the suggest/search APIs. # The source for which this configuration is to be used. |
| 548 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 549 | "name": "A String", # Source name for content indexed by the |
| 550 | # Indexing API. |
| 551 | }, |
| 552 | "crowdingConfig": { # Set search results crowding limits. Crowding is a situation in which # The crowding configuration for the source. |
| 553 | # multiple results from the same source or host "crowd out" other results, |
| 554 | # diminishing the quality of search for users. To foster better search quality |
| 555 | # and source diversity in search results, you can set a condition to reduce |
| 556 | # repetitive results by source. |
| 557 | "numResults": 42, # Maximum number of results allowed from a source. |
| 558 | # No limits will be set on results if this value is less than or equal to 0. |
| 559 | "numSuggestions": 42, # Maximum number of suggestions allowed from a source. |
| 560 | # No limits will be set on results if this value is less than or equal to 0. |
| 561 | }, |
| 562 | }, |
| 563 | ], |
| 564 | "scoringConfig": { # Scoring configurations for a source while processing a # Configuration for ranking results. |
| 565 | # Search or |
| 566 | # Suggest request. |
| 567 | "disableFreshness": True or False, # Whether to use freshness as a ranking signal. By default, freshness is used |
| 568 | # as a ranking signal. Note that this setting is not available in the Admin |
| 569 | # UI. |
| 570 | "disablePersonalization": True or False, # Whether to personalize the results. By default, personal signals will |
| 571 | # be used to boost results. |
| 572 | }, |
| 573 | "displayName": "A String", # Display name of the Search Application. |
| 574 | # The maximum length is 300 characters. |
| 575 | "name": "A String", # Name of the Search Application. |
| 576 | # <br />Format: searchapplications/{application_id}. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 577 | "dataSourceRestrictions": [ # Retrictions applied to the configurations. |
| 578 | # The maximum number of elements is 10. |
| 579 | { # Restriction on Datasource. |
| 580 | "filterOptions": [ # Filter options restricting the results. If multiple filters |
| 581 | # are present, they are grouped by object type before joining. |
| 582 | # Filters with the same object type are joined conjunctively, then |
| 583 | # the resulting expressions are joined disjunctively. |
| 584 | # |
| 585 | # The maximum number of elements is 20. |
| 586 | # |
| 587 | # NOTE: Suggest API supports only few filters at the moment: |
| 588 | # "objecttype", "type" and "mimetype". |
| 589 | # For now, schema specific filters cannot be used to filter suggestions. |
| 590 | { # Filter options to be applied on query. |
| 591 | "filter": { # A generic way of expressing filters in a query, which supports two # Generic filter to restrict the search, such as `lang:en`, `site:xyz`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 592 | # approaches: <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 593 | # **1. Setting a ValueFilter.** The name must match an operator_name defined in |
| 594 | # the schema for your data source. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 595 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 596 | # **2. Setting a CompositeFilter.** The filters are evaluated |
| 597 | # using the logical operator. The top-level operators can only be either an AND |
| 598 | # or a NOT. AND can appear only at the top-most level. OR can appear only under |
| 599 | # a top-level AND. |
| 600 | "compositeFilter": { |
| 601 | "subFilters": [ # Sub filters. |
| 602 | # Object with schema name: Filter |
| 603 | ], |
| 604 | "logicOperator": "A String", # The logic operator of the sub filter. |
| 605 | }, |
| 606 | "valueFilter": { |
| 607 | "operatorName": "A String", # The `operator_name` applied to the query, such as *price_greater_than*. |
| 608 | # The filter can work against both types of filters defined in the schema |
| 609 | # for your data source: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 610 | # <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 611 | # 1. `operator_name`, where the query filters results by the property |
| 612 | # that matches the value. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 613 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 614 | # 2. `greater_than_operator_name` or `less_than_operator_name` in your |
| 615 | # schema. The query filters the results for the property values that are |
| 616 | # greater than or less than the supplied value in the query. |
| 617 | "value": { # Definition of a single value with generic type. # The value to be compared with. |
| 618 | "timestampValue": "A String", |
| 619 | "doubleValue": 3.14, |
| 620 | "dateValue": { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 621 | "year": 42, # Year of date. Must be from 1 to 9999. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 622 | "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. |
| 623 | "month": 42, # Month of date. Must be from 1 to 12. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 624 | }, |
| 625 | "stringValue": "A String", |
| 626 | "booleanValue": True or False, |
| 627 | "integerValue": "A String", |
| 628 | }, |
| 629 | }, |
| 630 | }, |
| 631 | "objectType": "A String", # If object_type is set, only objects of that type are returned. This should |
| 632 | # correspond to the name of the object that was registered within the |
| 633 | # definition of schema. The maximum length is 256 characters. |
| 634 | }, |
| 635 | ], |
| 636 | "source": { # Defines sources for the suggest/search APIs. # The source of restriction. |
| 637 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 638 | "name": "A String", # Source name for content indexed by the |
| 639 | # Indexing API. |
| 640 | }, |
| 641 | }, |
| 642 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 643 | "operationIds": [ # Output only. IDs of the Long Running Operations (LROs) currently running for this |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 644 | # schema. Output only field. |
| 645 | "A String", |
| 646 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 647 | "defaultSortOptions": { # The default options for sorting the search results |
| 648 | "operatorName": "A String", # Name of the operator corresponding to the field to sort on. |
| 649 | # The corresponding property must be marked as |
| 650 | # sortable. |
| 651 | "sortOrder": "A String", # Ascending is the default sort order |
| 652 | }, |
| 653 | "defaultFacetOptions": [ # The default fields for returning facet results. |
| 654 | # The sources specified here also have been included in |
| 655 | # data_source_restrictions |
| 656 | # above. |
| 657 | { # Specifies operators to return facet results for. There will be one |
| 658 | # FacetResult for every source_name/object_type/operator_name combination. |
| 659 | "sourceName": "A String", # Source name to facet on. Format: datasources/{source_id} |
| 660 | # If empty, all data sources will be used. |
| 661 | "numFacetBuckets": 42, # Maximum number of facet buckets that should be returned for this facet. |
| 662 | # Defaults to 10. |
| 663 | # Maximum value is 100. |
| 664 | "operatorName": "A String", # Name of the operator chosen for faceting. @see |
| 665 | # cloudsearch.SchemaPropertyOptions |
| 666 | "objectType": "A String", # If object_type is set, only those objects of that type will be used to |
| 667 | # compute facets. If empty, then all objects will be used to compute facets. |
| 668 | }, |
| 669 | ], |
| 670 | }, |
| 671 | ], |
| 672 | }</pre> |
| 673 | </div> |
| 674 | |
| 675 | <div class="method"> |
| 676 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 677 | <pre>Retrieves the next page of results. |
| 678 | |
| 679 | Args: |
| 680 | previous_request: The request for the previous page. (required) |
| 681 | previous_response: The response from the request for the previous page. (required) |
| 682 | |
| 683 | Returns: |
| 684 | A request object that you can call 'execute()' on to request the next |
| 685 | page. Returns None if there are no more items in the collection. |
| 686 | </pre> |
| 687 | </div> |
| 688 | |
| 689 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 690 | <code class="details" id="reset">reset(name, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 691 | <pre>Resets a search application to default settings. This will return an empty |
| 692 | response. |
| 693 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 694 | **Note:** This API requires an admin account to execute. |
| 695 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 696 | Args: |
| 697 | name: string, The name of the search application to be reset. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 698 | <br />Format: applications/{application_id}. (required) |
| 699 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 700 | The object takes the form of: |
| 701 | |
| 702 | { |
| 703 | "debugOptions": { # Shared request debug options for all cloudsearch RPC methods. # Common debug options. |
| 704 | "enableDebugging": True or False, # If you are asked by Google to help with debugging, set this field. |
| 705 | # Otherwise, ignore this field. |
| 706 | }, |
| 707 | } |
| 708 | |
| 709 | x__xgafv: string, V1 error format. |
| 710 | Allowed values |
| 711 | 1 - v1 error format |
| 712 | 2 - v2 error format |
| 713 | |
| 714 | Returns: |
| 715 | An object of the form: |
| 716 | |
| 717 | { # This resource represents a long-running operation that is the result of a |
| 718 | # network API call. |
| 719 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 720 | # contains progress information and common metadata such as create time. |
| 721 | # Some services might not provide such metadata. Any method that returns a |
| 722 | # long-running operation should document the metadata type, if any. |
| 723 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 724 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 725 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 726 | # If `true`, the operation is completed, and either `error` or `response` is |
| 727 | # available. |
| 728 | "response": { # The normal response of the operation in case of success. If the original |
| 729 | # method returns no data on success, such as `Delete`, the response is |
| 730 | # `google.protobuf.Empty`. If the original method is standard |
| 731 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 732 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 733 | # is the original method name. For example, if the original method name |
| 734 | # is `TakeSnapshot()`, the inferred response type is |
| 735 | # `TakeSnapshotResponse`. |
| 736 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 737 | }, |
| 738 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 739 | # originally returns it. If you use the default HTTP mapping, the |
| 740 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 741 | "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. |
| 742 | # different programming environments, including REST APIs and RPC APIs. It is |
| 743 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 744 | # three pieces of data: error code, error message, and error details. |
| 745 | # |
| 746 | # You can find out more about this error model and how to work with it in the |
| 747 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 748 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 749 | # user-facing error message should be localized and sent in the |
| 750 | # google.rpc.Status.details field, or localized by the client. |
| 751 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 752 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 753 | # message types for APIs to use. |
| 754 | { |
| 755 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 756 | }, |
| 757 | ], |
| 758 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 759 | }</pre> |
| 760 | </div> |
| 761 | |
| 762 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 763 | <code class="details" id="update">update(name, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 764 | <pre>Updates a search application. |
| 765 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 766 | **Note:** This API requires an admin account to execute. |
| 767 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 768 | Args: |
| 769 | name: string, Name of the Search Application. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 770 | <br />Format: searchapplications/{application_id}. (required) |
| 771 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 772 | The object takes the form of: |
| 773 | |
| 774 | { # SearchApplication |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 775 | "sourceConfig": [ # Configuration for a sources specified in data_source_restrictions. |
| 776 | { # Configurations for a source while processing a |
| 777 | # Search or |
| 778 | # Suggest request. |
| 779 | "scoringConfig": { # Set the scoring configuration. This allows modifying the ranking of results # The scoring configuration for the source. |
| 780 | # for a source. |
| 781 | "sourceImportance": "A String", # Importance of the source. |
| 782 | }, |
| 783 | "source": { # Defines sources for the suggest/search APIs. # The source for which this configuration is to be used. |
| 784 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 785 | "name": "A String", # Source name for content indexed by the |
| 786 | # Indexing API. |
| 787 | }, |
| 788 | "crowdingConfig": { # Set search results crowding limits. Crowding is a situation in which # The crowding configuration for the source. |
| 789 | # multiple results from the same source or host "crowd out" other results, |
| 790 | # diminishing the quality of search for users. To foster better search quality |
| 791 | # and source diversity in search results, you can set a condition to reduce |
| 792 | # repetitive results by source. |
| 793 | "numResults": 42, # Maximum number of results allowed from a source. |
| 794 | # No limits will be set on results if this value is less than or equal to 0. |
| 795 | "numSuggestions": 42, # Maximum number of suggestions allowed from a source. |
| 796 | # No limits will be set on results if this value is less than or equal to 0. |
| 797 | }, |
| 798 | }, |
| 799 | ], |
| 800 | "scoringConfig": { # Scoring configurations for a source while processing a # Configuration for ranking results. |
| 801 | # Search or |
| 802 | # Suggest request. |
| 803 | "disableFreshness": True or False, # Whether to use freshness as a ranking signal. By default, freshness is used |
| 804 | # as a ranking signal. Note that this setting is not available in the Admin |
| 805 | # UI. |
| 806 | "disablePersonalization": True or False, # Whether to personalize the results. By default, personal signals will |
| 807 | # be used to boost results. |
| 808 | }, |
| 809 | "displayName": "A String", # Display name of the Search Application. |
| 810 | # The maximum length is 300 characters. |
| 811 | "name": "A String", # Name of the Search Application. |
| 812 | # <br />Format: searchapplications/{application_id}. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 813 | "dataSourceRestrictions": [ # Retrictions applied to the configurations. |
| 814 | # The maximum number of elements is 10. |
| 815 | { # Restriction on Datasource. |
| 816 | "filterOptions": [ # Filter options restricting the results. If multiple filters |
| 817 | # are present, they are grouped by object type before joining. |
| 818 | # Filters with the same object type are joined conjunctively, then |
| 819 | # the resulting expressions are joined disjunctively. |
| 820 | # |
| 821 | # The maximum number of elements is 20. |
| 822 | # |
| 823 | # NOTE: Suggest API supports only few filters at the moment: |
| 824 | # "objecttype", "type" and "mimetype". |
| 825 | # For now, schema specific filters cannot be used to filter suggestions. |
| 826 | { # Filter options to be applied on query. |
| 827 | "filter": { # A generic way of expressing filters in a query, which supports two # Generic filter to restrict the search, such as `lang:en`, `site:xyz`. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 828 | # approaches: <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 829 | # **1. Setting a ValueFilter.** The name must match an operator_name defined in |
| 830 | # the schema for your data source. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 831 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 832 | # **2. Setting a CompositeFilter.** The filters are evaluated |
| 833 | # using the logical operator. The top-level operators can only be either an AND |
| 834 | # or a NOT. AND can appear only at the top-most level. OR can appear only under |
| 835 | # a top-level AND. |
| 836 | "compositeFilter": { |
| 837 | "subFilters": [ # Sub filters. |
| 838 | # Object with schema name: Filter |
| 839 | ], |
| 840 | "logicOperator": "A String", # The logic operator of the sub filter. |
| 841 | }, |
| 842 | "valueFilter": { |
| 843 | "operatorName": "A String", # The `operator_name` applied to the query, such as *price_greater_than*. |
| 844 | # The filter can work against both types of filters defined in the schema |
| 845 | # for your data source: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 846 | # <br/><br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 847 | # 1. `operator_name`, where the query filters results by the property |
| 848 | # that matches the value. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 849 | # <br/> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 850 | # 2. `greater_than_operator_name` or `less_than_operator_name` in your |
| 851 | # schema. The query filters the results for the property values that are |
| 852 | # greater than or less than the supplied value in the query. |
| 853 | "value": { # Definition of a single value with generic type. # The value to be compared with. |
| 854 | "timestampValue": "A String", |
| 855 | "doubleValue": 3.14, |
| 856 | "dateValue": { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 857 | "year": 42, # Year of date. Must be from 1 to 9999. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 858 | "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. |
| 859 | "month": 42, # Month of date. Must be from 1 to 12. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 860 | }, |
| 861 | "stringValue": "A String", |
| 862 | "booleanValue": True or False, |
| 863 | "integerValue": "A String", |
| 864 | }, |
| 865 | }, |
| 866 | }, |
| 867 | "objectType": "A String", # If object_type is set, only objects of that type are returned. This should |
| 868 | # correspond to the name of the object that was registered within the |
| 869 | # definition of schema. The maximum length is 256 characters. |
| 870 | }, |
| 871 | ], |
| 872 | "source": { # Defines sources for the suggest/search APIs. # The source of restriction. |
| 873 | "predefinedSource": "A String", # Predefined content source for Google Apps. |
| 874 | "name": "A String", # Source name for content indexed by the |
| 875 | # Indexing API. |
| 876 | }, |
| 877 | }, |
| 878 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 879 | "operationIds": [ # Output only. IDs of the Long Running Operations (LROs) currently running for this |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 880 | # schema. Output only field. |
| 881 | "A String", |
| 882 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 883 | "defaultSortOptions": { # The default options for sorting the search results |
| 884 | "operatorName": "A String", # Name of the operator corresponding to the field to sort on. |
| 885 | # The corresponding property must be marked as |
| 886 | # sortable. |
| 887 | "sortOrder": "A String", # Ascending is the default sort order |
| 888 | }, |
| 889 | "defaultFacetOptions": [ # The default fields for returning facet results. |
| 890 | # The sources specified here also have been included in |
| 891 | # data_source_restrictions |
| 892 | # above. |
| 893 | { # Specifies operators to return facet results for. There will be one |
| 894 | # FacetResult for every source_name/object_type/operator_name combination. |
| 895 | "sourceName": "A String", # Source name to facet on. Format: datasources/{source_id} |
| 896 | # If empty, all data sources will be used. |
| 897 | "numFacetBuckets": 42, # Maximum number of facet buckets that should be returned for this facet. |
| 898 | # Defaults to 10. |
| 899 | # Maximum value is 100. |
| 900 | "operatorName": "A String", # Name of the operator chosen for faceting. @see |
| 901 | # cloudsearch.SchemaPropertyOptions |
| 902 | "objectType": "A String", # If object_type is set, only those objects of that type will be used to |
| 903 | # compute facets. If empty, then all objects will be used to compute facets. |
| 904 | }, |
| 905 | ], |
| 906 | } |
| 907 | |
| 908 | x__xgafv: string, V1 error format. |
| 909 | Allowed values |
| 910 | 1 - v1 error format |
| 911 | 2 - v2 error format |
| 912 | |
| 913 | Returns: |
| 914 | An object of the form: |
| 915 | |
| 916 | { # This resource represents a long-running operation that is the result of a |
| 917 | # network API call. |
| 918 | "metadata": { # Service-specific metadata associated with the operation. It typically |
| 919 | # contains progress information and common metadata such as create time. |
| 920 | # Some services might not provide such metadata. Any method that returns a |
| 921 | # long-running operation should document the metadata type, if any. |
| 922 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 923 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 924 | "done": True or False, # If the value is `false`, it means the operation is still in progress. |
| 925 | # If `true`, the operation is completed, and either `error` or `response` is |
| 926 | # available. |
| 927 | "response": { # The normal response of the operation in case of success. If the original |
| 928 | # method returns no data on success, such as `Delete`, the response is |
| 929 | # `google.protobuf.Empty`. If the original method is standard |
| 930 | # `Get`/`Create`/`Update`, the response should be the resource. For other |
| 931 | # methods, the response should have the type `XxxResponse`, where `Xxx` |
| 932 | # is the original method name. For example, if the original method name |
| 933 | # is `TakeSnapshot()`, the inferred response type is |
| 934 | # `TakeSnapshotResponse`. |
| 935 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 936 | }, |
| 937 | "name": "A String", # The server-assigned name, which is only unique within the same service that |
| 938 | # originally returns it. If you use the default HTTP mapping, the |
| 939 | # `name` should be a resource name ending with `operations/{unique_id}`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 940 | "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. |
| 941 | # different programming environments, including REST APIs and RPC APIs. It is |
| 942 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 943 | # three pieces of data: error code, error message, and error details. |
| 944 | # |
| 945 | # You can find out more about this error model and how to work with it in the |
| 946 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
| 947 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 948 | # user-facing error message should be localized and sent in the |
| 949 | # google.rpc.Status.details field, or localized by the client. |
| 950 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 951 | "details": [ # A list of messages that carry the error details. There is a common set of |
| 952 | # message types for APIs to use. |
| 953 | { |
| 954 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 955 | }, |
| 956 | ], |
| 957 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 958 | }</pre> |
| 959 | </div> |
| 960 | |
| 961 | </body></html> |