Reference documentation and code samples for the Google Cloud Retail V2 Client class CompleteQueryResponse.
Response of the autocomplete query.
Generated from protobuf message google.cloud.retail.v2.CompleteQueryResponse
Namespace
Google \ Cloud \ Retail \ V2Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ completion_results
array< CompleteQueryResponse\CompletionResult
>
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 the UserEvent.completion_detail for 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 when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules: * * They are ordered from latest to oldest. * * They are matched with CompleteQueryRequest.query case 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.
↳ attribute_results
array| Google\Protobuf\Internal\MapField
A map of matched attribute suggestions. This field is only available for cloud-retail
dataset. Current supported keys: * * brands
* * categories
getCompletionResults
Results of the matching suggestions. The result list is ordered and the first result is top suggestion.
setCompletionResults
Results of the matching suggestions. The result list is ordered and the first result is top suggestion.
$this
getAttributionToken
A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.
string
setAttributionToken
A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.
var
string
$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.
This feature is only available when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules:
- They are ordered from latest to oldest.
- They are matched with CompleteQueryRequest.query case 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.
setRecentSearchResults
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 when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules:
- They are ordered from latest to oldest.
- They are matched with CompleteQueryRequest.query case 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.
var
array< CompleteQueryResponse\RecentSearchResult
>
$this
getAttributeResults
A map of matched attribute suggestions. This field is only available for cloud-retail
dataset.
Current supported keys:
-
brands
-
categories
setAttributeResults
A map of matched attribute suggestions. This field is only available for cloud-retail
dataset.
Current supported keys:
-
brands
-
categories
$this