# REST Resource: settings.searchapplications

- [Resource: SearchApplication](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SearchApplication)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SearchApplication.SCHEMA_REPRESENTATION)
- [DataSourceRestriction](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#DataSourceRestriction)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#DataSourceRestriction.SCHEMA_REPRESENTATION)
- [Source](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source.SCHEMA_REPRESENTATION)
- [Source.PredefinedSource](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source.PredefinedSource)
- [FilterOptions](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#FilterOptions)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#FilterOptions.SCHEMA_REPRESENTATION)
- [Filter](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.SCHEMA_REPRESENTATION)
- [Filter.ValueFilter](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.ValueFilter)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.ValueFilter.SCHEMA_REPRESENTATION)
- [Value](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Value)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Value.SCHEMA_REPRESENTATION)
- [Filter.CompositeFilter](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.CompositeFilter)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.CompositeFilter.SCHEMA_REPRESENTATION)
- [Filter.CompositeFilter.LogicOperator](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.CompositeFilter.LogicOperator)
- [SourceConfig](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceConfig)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceConfig.SCHEMA_REPRESENTATION)
- [SourceScoringConfig](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceScoringConfig)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceScoringConfig.SCHEMA_REPRESENTATION)
- [SourceScoringConfig.SourceImportance](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceScoringConfig.SourceImportance)
- [SourceCrowdingConfig](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceCrowdingConfig)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceCrowdingConfig.SCHEMA_REPRESENTATION)
- [ScoringConfig](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#ScoringConfig)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#ScoringConfig.SCHEMA_REPRESENTATION)
- [SortOptions](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SortOptions)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SortOptions.SCHEMA_REPRESENTATION)
- [SortOptions.SortOrder](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SortOptions.SortOrder)
- [FacetOptions](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#FacetOptions)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#FacetOptions.SCHEMA_REPRESENTATION)
- [IntegerFacetingOptions](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#IntegerFacetingOptions)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#IntegerFacetingOptions.SCHEMA_REPRESENTATION)
- [QueryInterpretationConfig](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#QueryInterpretationConfig)
  - [JSON representation](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#QueryInterpretationConfig.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#METHODS_SUMMARY)

## Resource: SearchApplication

SearchApplication

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "dataSourceRestrictions": [ { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#DataSourceRestriction`) } ], "sourceConfig": [ { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceConfig`) } ], "scoringConfig": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#ScoringConfig`) }, "defaultSortOptions": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SortOptions`) }, "defaultFacetOptions": [ { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#FacetOptions`) } ], "returnResultThumbnailUrls": boolean, "operationIds": [ string ], "enableAuditLog": boolean, "queryInterpretationConfig": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#QueryInterpretationConfig`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` The name of the Search Application. Format: searchapplications/{applicationId}. |
| `displayName` | `string` Display name of the Search Application. The maximum length is 300 characters. |
| `dataSourceRestrictions[]` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#DataSourceRestriction`)`` Retrictions applied to the configurations. The maximum number of elements is 10. |
| `sourceConfig[]` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceConfig`)`` Configuration for a sources specified in dataSourceRestrictions. |
| `scoringConfig` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#ScoringConfig`)`` Configuration for ranking results. |
| `defaultSortOptions` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SortOptions`)`` The default options for sorting the search results |
| `defaultFacetOptions[]` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#FacetOptions`)`` The default fields for returning facet results. The sources specified here also have been included in `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SearchApplication.FIELDS.data_source_restrictions` above. |
| `returnResultThumbnailUrls` | `boolean` With each result we should return the URI for its thumbnail (when applicable) |
| `operationIds[]` | `string` Output only. IDs of the Long Running Operations (LROs) currently running for this schema. Output only field. |
| `enableAuditLog` | `boolean` Indicates whether audit logging is on/off for requests made for the search application in query APIs. |
| `queryInterpretationConfig` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#QueryInterpretationConfig`)`` The default options for query interpretation |

## DataSourceRestriction

Restriction on Datasource.

| JSON representation |
|---|
| ``` { "source": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source`) }, "filterOptions": [ { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#FilterOptions`) } ] } ``` |

| Fields ||
|---|---|
| `source` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source`)`` The source of restriction. |
| `filterOptions[]` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#FilterOptions`)`` Filter options restricting the results. If multiple filters are present, they are grouped by object type before joining. Filters with the same object type are joined conjunctively, then the resulting expressions are joined disjunctively. The maximum number of elements is 20. NOTE: Suggest API supports only few filters at the moment: "objecttype", "type" and "mimetype". For now, schema specific filters cannot be used to filter suggestions. |

## Source

Defines sources for the suggest/search APIs.

| JSON representation |
|---|
| ``` { "name": string, "predefinedSource": enum (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source.PredefinedSource`) } ``` |

| Fields ||
|---|---|
| Union field `source`. `source` can be only one of the following: ||
| `name` | `string` Source name for content indexed by the `Indexing API`. |
| `predefinedSource` | ``enum (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source.PredefinedSource`)`` Predefined content source for Google Apps. |

## Source.PredefinedSource

Predefined sources:

| Enums ||
|---|---|
| `NONE` |   |
| `QUERY_HISTORY` | Suggests queries issued by the user in the past. Only valid when used with the suggest API. Ignored when used in the query API. |
| `PERSON` | Suggests people in the organization. Only valid when used with the suggest API. Results in an error when used in the query API. |
| `GOOGLE_DRIVE` |   |
| `GOOGLE_GMAIL` |   |
| `GOOGLE_SITES` |   |
| `GOOGLE_GROUPS` |   |
| `GOOGLE_CALENDAR` |   |
| `GOOGLE_KEEP` |   |

## FilterOptions

Filter options to be applied on query.

| JSON representation |
|---|
| ``` { "objectType": string, "filter": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter`) } } ``` |

| Fields ||
|---|---|
| `objectType` | `string` If objectType is set, only objects of that type are returned. This should correspond to the name of the object that was registered within the definition of schema. The maximum length is 256 characters. |
| `filter` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter`)`` Generic filter to restrict the search, such as `lang:en`, `site:xyz`. |

## Filter

A generic way of expressing filters in a query, which supports two approaches:

**1. Setting a ValueFilter.** The name must match an operatorName defined in the schema for your data source.

**2. Setting a CompositeFilter.** The filters are evaluated using the logical operator. The top-level operators can only be either an AND or a NOT. AND can appear only at the top-most level. OR can appear only under a top-level AND.

| JSON representation |
|---|
| ``` { "valueFilter": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.ValueFilter`) }, "compositeFilter": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.CompositeFilter`) } } ``` |

| Fields ||
|---|---|
| Union field `filter`. `filter` can be only one of the following: ||
| `valueFilter` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.ValueFilter`)`` |
| `compositeFilter` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.CompositeFilter`)`` |

## Filter.ValueFilter

| JSON representation |
|---|
| ``` { "operatorName": string, "value": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Value`) } } ``` |

| Fields ||
|---|---|
| `operatorName` | `string` The `operatorName` applied to the query, such as *price_greater_than*. The filter can work against both types of filters defined in the schema for your data source: 1. `operatorName`, where the query filters results by the property that matches the value. 2. `greaterThanOperatorName` or `lessThanOperatorName` in your schema. The query filters the results for the property values that are greater than or less than the supplied value in the query. |
| `value` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Value`)`` The value to be compared with. |

## Value

Definition of a single value with generic type.

| JSON representation |
|---|
| ``` { "stringValue": string, "integerValue": string, "doubleValue": number, "timestampValue": string, "booleanValue": boolean, "dateValue": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/Date`) } } ``` |

| Fields ||
|---|---|
| Union field `value`. The value of the named property. `value` can be only one of the following: ||
| `stringValue` | `string` |
| `integerValue` | `string (https://developers.google.com/discovery/v1/type-format format)` |
| `doubleValue` | `number` |
| `timestampValue` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `booleanValue` | `boolean` |
| `dateValue` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/Date`)`` |

## Filter.CompositeFilter

| JSON representation |
|---|
| ``` { "logicOperator": enum (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.CompositeFilter.LogicOperator`), "subFilters": [ { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter`) } ] } ``` |

| Fields ||
|---|---|
| `logicOperator` | ``enum (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter.CompositeFilter.LogicOperator`)`` The logic operator of the sub filter. |
| `subFilters[]` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Filter`)`` Sub filters. |

## Filter.CompositeFilter.LogicOperator

| Enums ||
|---|---|
| `AND` | Logical operators, which can only be applied to sub filters. |
| `OR` |   |
| `NOT` | NOT can only be applied on a single sub filter. |

## SourceConfig

Configurations for a source while processing a `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query/search#google.apps.search.v1.QueryService.Search` or `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query/suggest#google.apps.search.v1.QueryService.Suggest` request.

| JSON representation |
|---|
| ``` { "source": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source`) }, "scoringConfig": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceScoringConfig`) }, "crowdingConfig": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceCrowdingConfig`) } } ``` |

| Fields ||
|---|---|
| `source` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#Source`)`` The source for which this configuration is to be used. |
| `scoringConfig` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceScoringConfig`)`` The scoring configuration for the source. |
| `crowdingConfig` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceCrowdingConfig`)`` The crowding configuration for the source. |

## SourceScoringConfig

Set the scoring configuration. This allows modifying the ranking of results for a source.

| JSON representation |
|---|
| ``` { "sourceImportance": enum (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceScoringConfig.SourceImportance`) } ``` |

| Fields ||
|---|---|
| `sourceImportance` | ``enum (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SourceScoringConfig.SourceImportance`)`` Importance of the source. |

## SourceScoringConfig.SourceImportance

The importance of a source which can be used to indicate if a source should be given more priority in ranking compared to another source.

| Enums ||
|---|---|
| `DEFAULT` |   |
| `LOW` |   |
| `HIGH` |   |

## SourceCrowdingConfig

Set search results crowding limits. Crowding is a situation in which multiple results from the same source or host "crowd out" other results, diminishing the quality of search for users. To foster better search quality and source diversity in search results, you can set a condition to reduce repetitive results by source.

| JSON representation |
|---|
| ``` { "numResults": integer, "numSuggestions": integer } ``` |

| Fields ||
|---|---|
| `numResults` | `integer` Maximum number of results allowed from a datasource in a result page as long as results from other sources are not exhausted. value specified must not be negative. A default value is used if this value is equal to 0. To disable crowding, set the value greater than 100. |
| `numSuggestions` | `integer` Maximum number of suggestions allowed from a source. No limits will be set on results if this value is less than or equal to 0. |

## ScoringConfig

Scoring configurations for a source while processing a `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query/search#google.apps.search.v1.QueryService.Search` or `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/query/suggest#google.apps.search.v1.QueryService.Suggest` request.

| JSON representation |
|---|
| ``` { "disableFreshness": boolean, "disablePersonalization": boolean } ``` |

| Fields ||
|---|---|
| `disableFreshness` | `boolean` Whether to use freshness as a ranking signal. By default, freshness is used as a ranking signal. Note that this setting is not available in the Admin UI. |
| `disablePersonalization` | `boolean` Whether to personalize the results. By default, personal signals will be used to boost results. |

## SortOptions

| JSON representation |
|---|
| ``` { "operatorName": string, "sortOrder": enum (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SortOptions.SortOrder`) } ``` |

| Fields ||
|---|---|
| `operatorName` | `string` The name of the operator corresponding to the field to sort on. The corresponding property must be marked as `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/Schema#PropertyDefinition.FIELDS.is_sortable`. |
| `sortOrder` | ``enum (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#SortOptions.SortOrder`)`` Ascending is the default sort order |

## SortOptions.SortOrder

| Enums ||
|---|---|
| `ASCENDING` |   |
| `DESCENDING` |   |

## FacetOptions

Specifies operators to return facet results for. There will be one FacetResult for every sourceName/objectType/operatorName combination.

| JSON representation |
|---|
| ``` { "sourceName": string, "objectType": string, "operatorName": string, "numFacetBuckets": integer, "integerFacetingOptions": { object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#IntegerFacetingOptions`) } } ``` |

| Fields ||
|---|---|
| `sourceName` | `string` Source name to facet on. Format: datasources/{sourceId} If empty, all data sources will be used. |
| `objectType` | `string` If objectType is set, only those objects of that type will be used to compute facets. If empty, then all objects will be used to compute facets. |
| `operatorName` | `string` The name of the operator chosen for faceting. @see cloudsearch.SchemaPropertyOptions |
| `numFacetBuckets` | `integer` Maximum number of facet buckets that should be returned for this facet. Defaults to 10. Maximum value is 100. |
| Union field `faceting_options`. `faceting_options` can be only one of the following: ||
| `integerFacetingOptions` | ``object (`https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications#IntegerFacetingOptions`)`` If set, describes integer faceting options for the given integer property. The corresponding integer property in the schema should be marked isFacetable. The number of buckets returned would be minimum of this and numFacetBuckets. |

## IntegerFacetingOptions

Used to specify integer faceting options.

| JSON representation |
|---|
| ``` { "integerBuckets": [ string ] } ``` |

| Fields ||
|---|---|
| `integerBuckets[]` | `string (https://developers.google.com/discovery/v1/type-format format)` Buckets for given integer values should be in strictly ascending order. For example, if values supplied are (1,5,10,100), the following facet buckets will be formed {\<1, \[1,5), \[5-10), \[10-100), \>=100}. |

## QueryInterpretationConfig

Default options to interpret user query.

| JSON representation |
|---|
| ``` { "forceVerbatimMode": boolean, "forceDisableSupplementalResults": boolean } ``` |

| Fields ||
|---|---|
| `forceVerbatimMode` | `boolean` Enable this flag to turn off all internal optimizations like natural language (NL) interpretation of queries, supplemental results retrieval, and usage of synonyms including custom ones. If this flag is set to True, it will take precedence over the option set at query level. For the default value of False, query level flag will set the correct interpretation for verbatim mode. |
| `forceDisableSupplementalResults` | `boolean` Set this flag to disable supplemental results retrieval, setting a flag here will not retrieve supplemental results for queries associated with a given search application. If this flag is set to True, it will take precedence over the option set at query level. For the default value of False, query level flag will set the correct interpretation for supplemental results. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/create` | Creates a search application. |
| ### `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/delete` | Deletes a search application. |
| ### `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/get` | Gets the specified search application. |
| ### `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/list` | Lists all search applications. |
| ### `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/patch` | Updates a search application. |
| ### `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/reset` | Resets a search application to default settings. |
| ### `https://developers.google.com/workspace/cloud-search/docs/reference/rest/v1/settings.searchapplications/update` | Updates a search application. |