- JSON representation
- Facet
- FacetValue
- GuidedSearchResult
- RefinementAttribute
- GeoSearchDebugInfo
- QueryExpansionInfo
- NaturalLanguageQueryUnderstandingInfo
- StructuredExtractedFilter
- Expression
- StringConstraint
- NumberConstraint
- Comparison
- GeolocationConstraint
- AndExpression
- OrExpression
- SessionInfo
- OneBoxResult
- OneBoxType
Response message for SearchService.Search
method.
JSON representation |
---|
{ "results": [ { object ( |
Fields | |
---|---|
results[] |
A list of matched documents. The order represents the ranking. |
facets[] |
Results of facets requested by user. |
guided |
Guided search result. |
total |
The estimated total count of matched items irrespective of pagination. The count of |
attribution |
A unique search token. This should be included in the |
redirect |
The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only |
next |
A token that can be sent as |
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. |
summary |
A summary as part of the search results. This field is only returned if |
applied |
Controls applied as part of the Control service. |
geo |
|
query |
Query expansion information for the returned results. |
natural |
Natural language query understanding information for the returned results. |
session |
Session information. Only set if |
one |
A list of One box results. There can be multiple One box results of different types. |
Facet
A facet result.
JSON representation |
---|
{
"key": string,
"values": [
{
object ( |
Fields | |
---|---|
key |
The key for this facet. For example, |
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, // Union field |
Fields | |
---|---|
count |
Number of items that have this facet value. |
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 "colors". |
interval |
Interval value for a facet, such as [10, 20) for facet "price". It matches |
GuidedSearchResult
Guided search result. The guided search helps user to refine the search results and narrow down to the real needs from a broaded search results.
JSON representation |
---|
{
"refinementAttributes": [
{
object ( |
Fields | |
---|---|
refinement |
A list of ranked refinement attributes. |
follow |
Suggested follow-up questions. |
RefinementAttribute
Useful attribute for search result refinements.
JSON representation |
---|
{ "attributeKey": string, "attributeValue": string } |
Fields | |
---|---|
attribute |
attribute key used to refine the results. For example, |
attribute |
attribute value used to refine the results. For example, |
GeoSearchDebugInfo
Debug information specifically related to forward geocoding issues arising from Geolocation Search.
JSON representation |
---|
{ "originalAddressQuery": string, "errorMessage": string } |
Fields | |
---|---|
original |
The address from which forward geocoding ingestion produced issues. |
error |
The error produced. |
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 |
NaturalLanguageQueryUnderstandingInfo
Information describing what natural language understanding was done on the input query.
JSON representation |
---|
{
"extractedFilters": string,
"rewrittenQuery": string,
"structuredExtractedFilter": {
object ( |
Fields | |
---|---|
extracted |
The filters that were extracted from the input query. |
rewritten |
Rewritten input query minus the extracted filters. |
structured |
The filters that were extracted from the input query represented in a structured form. |
StructuredExtractedFilter
The filters that were extracted from the input query represented in a structured form.
JSON representation |
---|
{
"expression": {
object ( |
Fields | |
---|---|
expression |
The expression denoting the filter that was extracted from the input query in a structured form. It can be a simple expression denoting a single string, numerical or geolocation constraint or a compound expression which is a combination of multiple expressions connected using logical (OR and AND) operators. |
Expression
The expression denoting the filter that was extracted from the input query.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field expr . The expression type. expr can be only one of the following: |
|
string |
String constraint expression. |
number |
Numerical constraint expression. |
geolocation |
Geolocation constraint expression. |
and |
Logical "And" compound operator connecting multiple expressions. |
or |
Logical "Or" compound operator connecting multiple expressions. |
StringConstraint
Constraint expression of a string field.
JSON representation |
---|
{ "fieldName": string, "values": [ string ], "querySegment": string } |
Fields | |
---|---|
field |
name of the string field as defined in the schema. |
values[] |
Values of the string field. The record will only be returned if the field value matches one of the values specified here. |
query |
Identifies the keywords within the search query that match a filter. |
NumberConstraint
Constraint expression of a number field. Example: price < 100.
JSON representation |
---|
{
"fieldName": string,
"comparison": enum ( |
Fields | |
---|---|
field |
name of the numerical field as defined in the schema. |
comparison |
The comparison operation performed between the field value and the value specified in the constraint. |
value |
The value specified in the numerical constraint. |
query |
Identifies the keywords within the search query that match a filter. |
Comparison
The comparison operation that was performed.
Enums | |
---|---|
COMPARISON_UNSPECIFIED |
Undefined comparison operator. |
EQUALS |
Denotes equality = operator. |
LESS_THAN_EQUALS |
Denotes less than or equal to <= operator. |
LESS_THAN |
Denotes less than < operator. |
GREATER_THAN_EQUALS |
Denotes greater than or equal to >= operator. |
GREATER_THAN |
Denotes greater than > operator. |
GeolocationConstraint
Constraint of a geolocation field. name of the geolocation field as defined in the schema.
JSON representation |
---|
{ "fieldName": string, "address": string, "latitude": number, "longitude": number, "radiusInMeters": number } |
Fields | |
---|---|
field |
The name of the geolocation field as defined in the schema. |
address |
The reference address that was inferred from the input query. The proximity of the reference address to the geolocation field will be used to filter the results. |
latitude |
The latitude of the geolocation inferred from the input query. |
longitude |
The longitude of the geolocation inferred from the input query. |
radius |
The radius in meters around the address. The record is returned if the location of the geolocation field is within the radius. |
AndExpression
Logical And
operator.
JSON representation |
---|
{
"expressions": [
{
object ( |
Fields | |
---|---|
expressions[] |
The expressions that were ANDed together. |
OrExpression
Logical Or
operator.
JSON representation |
---|
{
"expressions": [
{
object ( |
Fields | |
---|---|
expressions[] |
The expressions that were ORed together. |
SessionInfo
Information about the session.
JSON representation |
---|
{ "name": string, "queryId": string } |
Fields | |
---|---|
name |
Name of the session. If the auto-session mode is used (when |
query |
Query ID that corresponds to this search API call. One session can have multiple turns, each with a unique query ID. By specifying the session name and this query ID in the Answer API call, the answer generation happens in the context of the search results from this search call. |
OneBoxResult
OneBoxResult is a holder for all results of specific type that we want to display in UI differently.
JSON representation |
---|
{ "oneBoxType": enum ( |
Fields | |
---|---|
one |
The type of One box result. |
search |
The search results for this One box. |
OneBoxType
The type of One box result.
Enums | |
---|---|
ONE_BOX_TYPE_UNSPECIFIED |
Default value. Should not be used. |
PEOPLE |
One box result contains people results. |
ORGANIZATION |
One box result contains organization results. |
SLACK |
One box result contains slack results. |
KNOWLEDGE_GRAPH |
One box result contains Knowledge Graph search responses. |