Results of the matching suggestions. The result list is ordered and the first result is top suggestion.
↳ attribution_token
string
A unique complete token. This should be included in theUserEvent.completion_detailfor search events resulting from this completion, which enables accurate attribution of complete model performance.
↳ recent_search_results
array<CompleteQueryResponse\RecentSearchResult>
Deprecated. Matched recent searches of this user. The maximum number of recent searches is 10. This field is a restricted feature. If you want to enable it, contact Retail Search support. This feature is only available whenCompleteQueryRequest.visitor_idfield is set andUserEventis imported. The recent searches satisfy the follow rules: * * They are ordered from latest to oldest. * * They are matched withCompleteQueryRequest.querycase insensitively. * * They are transformed to lower case. * * They are UTF-8 safe. Recent searches are deduplicated. More recent searches will be reserved when duplication happens.
A unique complete token. This should be included in theUserEvent.completion_detailfor search events resulting from this completion, which enables accurate
attribution of complete model performance.
Returns
Type
Description
string
setAttributionToken
A unique complete token. This should be included in theUserEvent.completion_detailfor search events resulting from this completion, which enables accurate
attribution of complete model performance.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getRecentSearchResults
Deprecated. Matched recent searches of this user. The maximum number of
recent searches is 10. This field is a restricted feature. If you want to
enable it, contact Retail Search support.
Deprecated. Matched recent searches of this user. The maximum number of
recent searches is 10. This field is a restricted feature. If you want to
enable it, contact Retail Search support.
[[["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 Retail V2 Client - Class CompleteQueryResponse (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-retail/latest/V2.CompleteQueryResponse)\n- [2.3.0](/php/docs/reference/cloud-retail/2.3.0/V2.CompleteQueryResponse)\n- [2.2.1](/php/docs/reference/cloud-retail/2.2.1/V2.CompleteQueryResponse)\n- [2.1.3](/php/docs/reference/cloud-retail/2.1.3/V2.CompleteQueryResponse)\n- [2.0.0](/php/docs/reference/cloud-retail/2.0.0/V2.CompleteQueryResponse)\n- [1.7.0](/php/docs/reference/cloud-retail/1.7.0/V2.CompleteQueryResponse)\n- [1.6.4](/php/docs/reference/cloud-retail/1.6.4/V2.CompleteQueryResponse)\n- [1.5.0](/php/docs/reference/cloud-retail/1.5.0/V2.CompleteQueryResponse)\n- [1.4.2](/php/docs/reference/cloud-retail/1.4.2/V2.CompleteQueryResponse)\n- [1.3.1](/php/docs/reference/cloud-retail/1.3.1/V2.CompleteQueryResponse)\n- [1.2.1](/php/docs/reference/cloud-retail/1.2.1/V2.CompleteQueryResponse)\n- [1.1.1](/php/docs/reference/cloud-retail/1.1.1/V2.CompleteQueryResponse)\n- [1.0.1](/php/docs/reference/cloud-retail/1.0.1/V2.CompleteQueryResponse) \nReference documentation and code samples for the Google Cloud Retail V2 Client class CompleteQueryResponse.\n\nResponse of the autocomplete query.\n\nGenerated from protobuf message `google.cloud.retail.v2.CompleteQueryResponse`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Retail \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getCompletionResults\n\nResults of the matching suggestions. The result list is ordered and the\nfirst result is top suggestion.\n\n### setCompletionResults\n\nResults of the matching suggestions. The result list is ordered and the\nfirst result is top suggestion.\n\n### getAttributionToken\n\nA unique complete token. This should be included in the\n[UserEvent.completion_detail](/php/docs/reference/cloud-retail/latest/V2.UserEvent#_Google_Cloud_Retail_V2_UserEvent__getCompletionDetail__)\nfor search events resulting from this completion, which enables accurate\nattribution of complete model performance.\n\n### setAttributionToken\n\nA unique complete token. This should be included in the\n[UserEvent.completion_detail](/php/docs/reference/cloud-retail/latest/V2.UserEvent#_Google_Cloud_Retail_V2_UserEvent__getCompletionDetail__)\nfor search events resulting from this completion, which enables accurate\nattribution of complete model performance.\n\n### getRecentSearchResults\n\nDeprecated. Matched recent searches of this user. The maximum number of\nrecent searches is 10. This field is a restricted feature. If you want to\nenable it, contact Retail Search support.\n\nThis feature is only available when\n[CompleteQueryRequest.visitor_id](/php/docs/reference/cloud-retail/latest/V2.CompleteQueryRequest#_Google_Cloud_Retail_V2_CompleteQueryRequest__getVisitorId__)\nfield is set and [UserEvent](/php/docs/reference/cloud-retail/latest/V2.UserEvent) is imported.\nThe recent searches satisfy the follow rules:\n\n- They are ordered from latest to oldest.\n- They are matched with [CompleteQueryRequest.query](/php/docs/reference/cloud-retail/latest/V2.CompleteQueryRequest#_Google_Cloud_Retail_V2_CompleteQueryRequest__getQuery__) case insensitively.\n- They are transformed to lower case.\n- They are UTF-8 safe. Recent searches are deduplicated. More recent searches will be reserved when duplication happens.\n\n### setRecentSearchResults\n\nDeprecated. Matched recent searches of this user. The maximum number of\nrecent searches is 10. This field is a restricted feature. If you want to\nenable it, contact Retail Search support.\n\nThis feature is only available when\n[CompleteQueryRequest.visitor_id](/php/docs/reference/cloud-retail/latest/V2.CompleteQueryRequest#_Google_Cloud_Retail_V2_CompleteQueryRequest__getVisitorId__)\nfield is set and [UserEvent](/php/docs/reference/cloud-retail/latest/V2.UserEvent) is imported.\nThe recent searches satisfy the follow rules:\n\n- They are ordered from latest to oldest.\n- They are matched with [CompleteQueryRequest.query](/php/docs/reference/cloud-retail/latest/V2.CompleteQueryRequest#_Google_Cloud_Retail_V2_CompleteQueryRequest__getQuery__) case insensitively.\n- They are transformed to lower case.\n- They are UTF-8 safe. Recent searches are deduplicated. More recent searches will be reserved when duplication happens.\n\n### getAttributeResults\n\nA map of matched attribute suggestions. This field is only available for\n`cloud-retail` dataset.\n\nCurrent supported keys:\n\n- `brands`\n- `categories`\n\n### setAttributeResults\n\nA map of matched attribute suggestions. This field is only available for\n`cloud-retail` dataset.\n\nCurrent supported keys:\n\n- `brands`\n- `categories`"]]