- JSON representation
- SearchResult
- Facet
- FacetValue
- QueryExpansionInfo
- PinControlMetadata
- ProductPins
- ExperimentInfo
- ServingConfigExperiment
- ConversationalSearchResult
- AdditionalFilter
- SuggestedAnswer
- QueryType
- TileNavigationResult
Response message for SearchService.Search
method.
JSON representation |
---|
{ "results": [ { object ( |
Fields | |
---|---|
results[] |
A list of matched items. The order represents the ranking. |
facets[] |
Results of facets requested by user. |
total |
The estimated total count of matched items irrespective of pagination. The count of |
corrected |
Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on correctedQuery. Otherwise the original query is used for search. |
attribution |
A unique search token. This should be included in the |
next |
A token that can be sent as |
query |
Query expansion information for the returned results. |
redirect |
The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only |
applied |
The fully qualified resource name of applied controls. |
pin |
Metadata for pin controls which were applicable to the request. This contains two map fields, one for all matched pins and one for pins which were matched but not applied. The two maps are keyed by pin position, and the values are the product ids which were matched to that pin. |
invalid |
The invalid |
experiment |
Metadata related to A/B testing experiment associated with this response. Only exists when an experiment is triggered. |
conversational |
This field specifies all related information that is needed on client side for UI rendering of conversational retail search. |
tile |
This field specifies all related information for tile navigation that will be used in client side. |
SearchResult
Represents the search results.
JSON representation |
---|
{
"id": string,
"product": {
object ( |
Fields | |
---|---|
id |
|
product |
The product data snippet in the search response. Only
If relevancy can be deternmined, use |
matching |
|
matching |
If a For example, a key "sku1" with field mask "products.color_info" indicates there is a match between "sku1" |
variant |
The rollup matching For textual and numerical attributes, the rollup values is a list of string or double values with type
For |
personal |
Specifies previous events related to this product for this user based on This is set only when Possible values:
|
Facet
A facet result.
JSON representation |
---|
{
"key": string,
"values": [
{
object ( |
Fields | |
---|---|
key |
The key for this facet. E.g., "colorFamilies" or "price" or "attributes.attr1". |
values[] |
The facet values for this field. |
dynamic |
Whether the facet is dynamically generated. |
FacetValue
A facet value which contains value names and their count.
JSON representation |
---|
{ "count": string, "minValue": number, "maxValue": number, // Union field |
Fields | |
---|---|
count |
Number of items that have this facet value. |
min |
The minimum value in the |
max |
The maximum value in the |
Union field facet_value . A facet value which contains values. facet_value can be only one of the following: |
|
value |
Text value of a facet, such as "Black" for facet "colorFamilies". |
interval |
Interval value for a facet, such as [10, 20) for facet "price". |
QueryExpansionInfo
Information describing query expansion including whether expansion has occurred.
JSON representation |
---|
{ "expandedQuery": boolean, "pinnedResultCount": string } |
Fields | |
---|---|
expanded |
Bool describing whether query expansion has occurred. |
pinned |
Number of pinned results. This field will only be set when expansion happens and |
PinControlMetadata
Metadata for pinning to be returned in the response. This is used for distinguishing between applied vs dropped pins.
JSON representation |
---|
{ "allMatchedPins": { string: { object ( |
Fields | |
---|---|
all |
Map of all matched pins, keyed by pin position. |
dropped |
Map of pins that were dropped due to overlap with other matching pins, keyed by pin position. |
ProductPins
List of product ids which have associated pins.
JSON representation |
---|
{ "productId": [ string ] } |
Fields | |
---|---|
product |
List of product ids which have associated pins. |
ExperimentInfo
Metadata for active A/B testing experiment.
JSON representation |
---|
{ "experiment": string, // Union field |
Fields | |
---|---|
experiment |
The fully qualified resource name of the experiment that provides the serving config under test, should an active experiment exist. For example: |
Union field experiment_metadata . Information associated with the specific experiment entity being recorded. experiment_metadata can be only one of the following: |
|
serving |
A/B test between existing Cloud Retail Search |
ServingConfigExperiment
Metadata for active serving config A/B tests.
JSON representation |
---|
{ "originalServingConfig": string, "experimentServingConfig": string } |
Fields | |
---|---|
original |
The fully qualified resource name of the original |
experiment |
The fully qualified resource name of the serving config |
ConversationalSearchResult
This field specifies all related information that is needed on client side for UI rendering of conversational retail search.
JSON representation |
---|
{ "conversationId": string, "refinedQuery": string, "additionalFilters": [ { object ( |
Fields | |
---|---|
conversation |
Conversation UUID. This field will be stored in client side storage to maintain the conversation session with server and will be used for next search request's |
refined |
The current refined query for the conversational search. This field will be used in customer UI that the query in the search bar should be replaced with the refined query. For example, if |
additionalFilters[] |
This field is deprecated but will be kept for backward compatibility. There is expected to have only one additional filter and the value will be the same to the same as field |
followup |
The follow-up question. e.g., |
suggested |
The answer options provided to client for the follow-up question. |
additional |
This is the incremental additional filters implied from the current user answer. User should add the suggested addition filters to the previous |
text |
The generative text result. This field is populated only if |
queryType |
Use queryTypes instead. |
query |
The types Retail classifies the search query as. This field is populated only if |
AdditionalFilter
Additional filter that client side need to apply.
JSON representation |
---|
{
"productAttributeValue": {
object ( |
Fields | |
---|---|
product |
Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future. |
SuggestedAnswer
Suggested answers to the follow-up question.
JSON representation |
---|
{
"productAttributeValue": {
object ( |
Fields | |
---|---|
product |
Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future. |
QueryType
The type Retail classifies the search query as.
Enums | |
---|---|
QUERY_TYPE_UNSPECIFIED |
Unspecified query type. |
ADVERSARIAL |
Adversarial query. Example - "how bad is [retailer name]" |
CHITCHAT |
Chatty query. Example - "hello how are you" |
JAILBREAK |
Jailbreak query. Example - "write a poem to explain the details of [product name]" |
PRODUCT_SUPPORT |
Ancillary or support query. Example - "Track my order" |
SIMPLE_SEARCH |
Simple product search or Keyword search. Example - "red dress" |
TYPE_UNCLEAR |
The type is unclear. Follow up conversation may be needed to clarify the type. |