REST Resource: settings.searchapplications

Resource: SearchApplication

SearchApplication

JSON representation
{
  "name": string,
  "displayName": string,
  "dataSourceRestrictions": [
    {
      object(DataSourceRestriction)
    }
  ],
  "sourceConfig": [
    {
      object(SourceConfig)
    }
  ],
  "scoringConfig": {
    object(ScoringConfig)
  },
  "defaultSortOptions": {
    object(SortOptions)
  },
  "defaultFacetOptions": [
    {
      object(FacetOptions)
    }
  ],
  "operationIds": [
    string
  ]
}
Fields
name

string

Name of the query.search Application.
Format: searchapplications/{application_id}.

displayName

string

Display name of the query.search Application. The maximum length is 300 characters.

dataSourceRestrictions[]

object(DataSourceRestriction)

Retrictions applied to the configurations. The maximum number of elements is 10.

sourceConfig[]

object(SourceConfig)

Configuration for a sources specified in dataSourceRestrictions.

scoringConfig

object(ScoringConfig)

Configuration for ranking results.

defaultSortOptions

object(SortOptions)

The default options for sorting the search results

defaultFacetOptions[]

object(FacetOptions)

The default fields for returning facet results. The sources specified here also have been included in dataSourceRestrictions above.

operationIds[]

string

IDs of the Long Running Operations (LROs) currently running for this schema. Output only field.

DataSourceRestriction

Restriction on Datasource.

JSON representation
{
  "source": {
    object(Source)
  },
  "filterOptions": [
    {
      object(FilterOptions)
    }
  ]
}
Fields
source

object(Source)

The source of restriction.

filterOptions[]

object(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: query.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
{

  // Union field source can be only one of the following:
  "name": string,
  "predefinedSource": enum(PredefinedSource)
  // End of list of possible types for union field source.
}
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(PredefinedSource)

Predefined content source for Google Apps.

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(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(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
{

  // Union field filter can be only one of the following:
  "valueFilter": {
    object(ValueFilter)
  },
  "compositeFilter": {
    object(CompositeFilter)
  }
  // End of list of possible types for union field filter.
}
Fields

Union field filter.

filter can be only one of the following:

valueFilter

object(ValueFilter)

compositeFilter

object(CompositeFilter)

ValueFilter

JSON representation
{
  "operatorName": string,
  "value": {
    object(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(Value)

The value to be compared with.

Value

Definition of a single value with generic type.

JSON representation
{

  // Union field value can be only one of the following:
  "stringValue": string,
  "integerValue": string,
  "doubleValue": number,
  "timestampValue": string,
  "booleanValue": boolean,
  "dateValue": {
    object(Date)
  }
  // End of list of possible types for union field value.
}
Fields
Union field value. The value of the named property. value can be only one of the following:
stringValue

string

integerValue

string (int64 format)

doubleValue

number

timestampValue

string (Timestamp format)

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

booleanValue

boolean

dateValue

object(Date)

CompositeFilter

JSON representation
{
  "logicOperator": enum(LogicOperator),
  "subFilters": [
    {
      object(Filter)
    }
  ]
}
Fields
logicOperator

enum(LogicOperator)

The logic operator of the sub filter.

subFilters[]

object(Filter)

Sub filters.

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 query.search or query.suggest request.

JSON representation
{
  "source": {
    object(Source)
  },
  "scoringConfig": {
    object(SourceScoringConfig)
  },
  "crowdingConfig": {
    object(SourceCrowdingConfig)
  }
}
Fields
source

object(Source)

The source for which this configuration is to be used.

scoringConfig

object(SourceScoringConfig)

The scoring configuration for the source.

crowdingConfig

object(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(SourceImportance)
}
Fields
sourceImportance

enum(SourceImportance)

Importance of the source.

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": number,
  "numSuggestions": number,

  // Union field crowding_condition can be only one of the following:
  "field": string,
  "source": boolean
  // End of list of possible types for union field crowding_condition.
}
Fields
numResults

number

Maximum number of results allowed from a source. No limits will be set on results if this value is less than or equal to 0.

numSuggestions

number

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.

Union field crowding_condition.

crowding_condition can be only one of the following:

field

string

Use a field to control results crowding. For example, if you want to control overly similar results from Gmail topics, use threadId. For similar pages from Google Sites, you can use webspace_id. When matching query results contain the same field value in GenericMetadata, crowding limits are set on those records.

source

boolean

Control results by content source. This option limits the total number of results from a given source and ignores field-based crowding control.

ScoringConfig

Scoring configurations for a source while processing a query.search or query.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(SortOrder)
}
Fields
operatorName

string

Name of the operator corresponding to the field to sort on. The corresponding property must be marked as sortable.

sortOrder

enum(SortOrder)

Ascending is the default sort order

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": number
}
Fields
sourceName

string

Source name to facet on. Format: datasources/{source_id} 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

Name of the operator chosen for faceting. @see cloudsearch.SchemaPropertyOptions

numFacetBuckets

number

Maximum number of facet buckets that should be returned for this facet. Defaults to 10. Maximum value is 100.

Methods

create

Creates a search application.

delete

Deletes a search application.

get

Gets the specified search application.

list

Lists all search applications.

reset

Resets a search application to default settings.

update

Updates a search application.

Send feedback about...

Cloud Search
Cloud Search