Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class SearchInfo.
Detailed search information.
Generated from protobuf message google.cloud.discoveryengine.v1.SearchInfo
Namespace
Google \ Cloud \ DiscoveryEngine \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
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
Type
Description
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
Name
Description
var
string
Returns
Type
Description
$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
Type
Description
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
Name
Description
var
string
Returns
Type
Description
$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
Type
Description
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Discovery Engine V1 Client - Class SearchInfo (1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchInfo)\n- [1.6.1](/php/docs/reference/cloud-discoveryengine/1.6.1/V1.SearchInfo)\n- [1.5.1](/php/docs/reference/cloud-discoveryengine/1.5.1/V1.SearchInfo)\n- [1.4.0](/php/docs/reference/cloud-discoveryengine/1.4.0/V1.SearchInfo)\n- [1.3.3](/php/docs/reference/cloud-discoveryengine/1.3.3/V1.SearchInfo)\n- [1.2.0](/php/docs/reference/cloud-discoveryengine/1.2.0/V1.SearchInfo)\n- [1.1.0](/php/docs/reference/cloud-discoveryengine/1.1.0/V1.SearchInfo)\n- [1.0.0](/php/docs/reference/cloud-discoveryengine/1.0.0/V1.SearchInfo)\n- [0.11.3](/php/docs/reference/cloud-discoveryengine/0.11.3/V1.SearchInfo)\n- [0.8.0](/php/docs/reference/cloud-discoveryengine/0.8.0/V1.SearchInfo)\n- [0.7.1](/php/docs/reference/cloud-discoveryengine/0.7.1/V1.SearchInfo)\n- [0.6.0](/php/docs/reference/cloud-discoveryengine/0.6.0/V1.SearchInfo)\n- [0.5.0](/php/docs/reference/cloud-discoveryengine/0.5.0/V1.SearchInfo)\n- [0.4.0](/php/docs/reference/cloud-discoveryengine/0.4.0/V1.SearchInfo)\n- [0.3.0](/php/docs/reference/cloud-discoveryengine/0.3.0/V1.SearchInfo)\n- [0.2.0](/php/docs/reference/cloud-discoveryengine/0.2.0/V1.SearchInfo)\n- [0.1.1](/php/docs/reference/cloud-discoveryengine/0.1.1/V1.SearchInfo) \nReference documentation and code samples for the Google Cloud Discovery Engine V1 Client class SearchInfo.\n\nDetailed search information.\n\nGenerated from protobuf message `google.cloud.discoveryengine.v1.SearchInfo`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ DiscoveryEngine \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getSearchQuery\n\nThe user's search query.\n\nSee\n[SearchRequest.query](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest#_Google_Cloud_DiscoveryEngine_V1_SearchRequest__getQuery__)\nfor definition.\nThe value must be a UTF-8 encoded string with a length limit of 5,000\ncharacters. Otherwise, an `INVALID_ARGUMENT` error is returned.\nAt least one of\n[search_query](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchInfo#_Google_Cloud_DiscoveryEngine_V1_SearchInfo__getSearchQuery__) or\n[PageInfo.page_category](/php/docs/reference/cloud-discoveryengine/latest/V1.PageInfo#_Google_Cloud_DiscoveryEngine_V1_PageInfo__getPageCategory__)\nis required for `search` events. Other event types should not set this\nfield. Otherwise, an `INVALID_ARGUMENT` error is returned.\n\n### setSearchQuery\n\nThe user's search query.\n\nSee\n[SearchRequest.query](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest#_Google_Cloud_DiscoveryEngine_V1_SearchRequest__getQuery__)\nfor definition.\nThe value must be a UTF-8 encoded string with a length limit of 5,000\ncharacters. Otherwise, an `INVALID_ARGUMENT` error is returned.\nAt least one of\n[search_query](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchInfo#_Google_Cloud_DiscoveryEngine_V1_SearchInfo__getSearchQuery__) or\n[PageInfo.page_category](/php/docs/reference/cloud-discoveryengine/latest/V1.PageInfo#_Google_Cloud_DiscoveryEngine_V1_PageInfo__getPageCategory__)\nis required for `search` events. Other event types should not set this\nfield. Otherwise, an `INVALID_ARGUMENT` error is returned.\n\n### getOrderBy\n\nThe order in which products are returned, if applicable.\n\nSee\n[SearchRequest.order_by](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest#_Google_Cloud_DiscoveryEngine_V1_SearchRequest__getOrderBy__)\nfor definition and syntax.\nThe value must be a UTF-8 encoded string with a length limit of 1,000\ncharacters. Otherwise, an `INVALID_ARGUMENT` error is returned.\nThis can only be set for `search` events. Other event types should not set\nthis field. Otherwise, an `INVALID_ARGUMENT` error is returned.\n\n### setOrderBy\n\nThe order in which products are returned, if applicable.\n\nSee\n[SearchRequest.order_by](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest#_Google_Cloud_DiscoveryEngine_V1_SearchRequest__getOrderBy__)\nfor definition and syntax.\nThe value must be a UTF-8 encoded string with a length limit of 1,000\ncharacters. Otherwise, an `INVALID_ARGUMENT` error is returned.\nThis can only be set for `search` events. Other event types should not set\nthis field. Otherwise, an `INVALID_ARGUMENT` error is returned.\n\n### getOffset\n\nAn integer that specifies the current offset for pagination (the 0-indexed\nstarting location, amongst the products deemed by the API as relevant).\n\nSee\n[SearchRequest.offset](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest#_Google_Cloud_DiscoveryEngine_V1_SearchRequest__getOffset__)\nfor definition.\nIf this field is negative, an `INVALID_ARGUMENT` is returned.\nThis can only be set for `search` events. Other event types should not set\nthis field. Otherwise, an `INVALID_ARGUMENT` error is returned.\n\n### hasOffset\n\n### clearOffset\n\n### setOffset\n\nAn integer that specifies the current offset for pagination (the 0-indexed\nstarting location, amongst the products deemed by the API as relevant).\n\nSee\n[SearchRequest.offset](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest#_Google_Cloud_DiscoveryEngine_V1_SearchRequest__getOffset__)\nfor definition.\nIf this field is negative, an `INVALID_ARGUMENT` is returned.\nThis can only be set for `search` events. Other event types should not set\nthis field. Otherwise, an `INVALID_ARGUMENT` error is returned."]]