Google Cloud Discovery Engine V1beta Client - Class SearchInfo (0.7.1)

Reference documentation and code samples for the Google Cloud Discovery Engine V1beta Client class SearchInfo.

Detailed search information.

Generated from protobuf message google.cloud.discoveryengine.v1beta.SearchInfo

Namespace

Google \ Cloud \ DiscoveryEngine \ V1beta

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ search_query string

The user's search query. See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query or PageInfo.page_category is required for search events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.

↳ order_by string

The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for search events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.

↳ offset int

An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See SearchRequest.offset for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for search events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.

getSearchQuery

The user's search query.

See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query or PageInfo.page_category is required for search events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.

Returns
TypeDescription
string

setSearchQuery

The user's search query.

See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query or PageInfo.page_category is required for search events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getOrderBy

The order in which products are returned, if applicable.

See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for search events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.

Returns
TypeDescription
string

setOrderBy

The order in which products are returned, if applicable.

See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for search events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getOffset

An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant).

See SearchRequest.offset for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for search events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.

Returns
TypeDescription
int

hasOffset

clearOffset

setOffset

An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant).

See SearchRequest.offset for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for search events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.

Parameter
NameDescription
var int
Returns
TypeDescription
$this