Reference documentation and code samples for the Google Cloud Retail V2 Client class SearchResponse.
Response message for SearchService.Search method.
Generated from protobuf message google.cloud.retail.v2.SearchResponse
Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ results
array< Google\Cloud\Retail\V2\SearchResponse\SearchResult
>
A list of matched items. The order represents the ranking.
↳ facets
↳ total_size
int
The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.
↳ corrected_query
string
Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.
↳ attribution_token
string
A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.
↳ next_page_token
string
A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
↳ query_expansion_info
Google\Cloud\Retail\V2\SearchResponse\QueryExpansionInfo
Query expansion information for the returned results.
↳ redirect_uri
string
The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.
↳ applied_controls
↳ invalid_condition_boost_specs
array< Google\Cloud\Retail\V2\SearchRequest\BoostSpec\ConditionBoostSpec
>
The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving.
getResults
A list of matched items. The order represents the ranking.
Generated from protobuf field repeated .google.cloud.retail.v2.SearchResponse.SearchResult results = 1;
Google\Protobuf\Internal\RepeatedField
setResults
A list of matched items. The order represents the ranking.
Generated from protobuf field repeated .google.cloud.retail.v2.SearchResponse.SearchResult results = 1;
$this
getFacets
Results of facets requested by user.
Generated from protobuf field repeated .google.cloud.retail.v2.SearchResponse.Facet facets = 2;
Google\Protobuf\Internal\RepeatedField
setFacets
Results of facets requested by user.
Generated from protobuf field repeated .google.cloud.retail.v2.SearchResponse.Facet facets = 2;
$this
getTotalSize
The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.
Generated from protobuf field int32 total_size = 3;
int
setTotalSize
The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.
Generated from protobuf field int32 total_size = 3;
var
int
$this
getCorrectedQuery
Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query.
Otherwise the original query is used for search.
Generated from protobuf field string corrected_query = 4;
string
setCorrectedQuery
Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query.
Otherwise the original query is used for search.
Generated from protobuf field string corrected_query = 4;
var
string
$this
getAttributionToken
A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.
Generated from protobuf field string attribution_token = 5;
string
setAttributionToken
A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.
Generated from protobuf field string attribution_token = 5;
var
string
$this
getNextPageToken
A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
Generated from protobuf field string next_page_token = 6;
string
setNextPageToken
A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
Generated from protobuf field string next_page_token = 6;
var
string
$this
getQueryExpansionInfo
Query expansion information for the returned results.
Generated from protobuf field .google.cloud.retail.v2.SearchResponse.QueryExpansionInfo query_expansion_info = 7;
hasQueryExpansionInfo
clearQueryExpansionInfo
setQueryExpansionInfo
Query expansion information for the returned results.
Generated from protobuf field .google.cloud.retail.v2.SearchResponse.QueryExpansionInfo query_expansion_info = 7;
$this
getRedirectUri
The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.
Generated from protobuf field string redirect_uri = 10;
string
setRedirectUri
The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.
Generated from protobuf field string redirect_uri = 10;
var
string
$this
getAppliedControls
The fully qualified resource name of applied controls .
Generated from protobuf field repeated string applied_controls = 12;
Google\Protobuf\Internal\RepeatedField
setAppliedControls
The fully qualified resource name of applied controls .
Generated from protobuf field repeated string applied_controls = 12;
var
string[]
$this
getInvalidConditionBoostSpecs
The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving.
Generated from protobuf field repeated .google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec invalid_condition_boost_specs = 14;
Google\Protobuf\Internal\RepeatedField
setInvalidConditionBoostSpecs
The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving.
Generated from protobuf field repeated .google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec invalid_condition_boost_specs = 14;
$this