0.20.1 (latest) 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.12 0.12.3 0.11.14 0.10.0 0.9.1 0.8.1 0.7.0 0.6.0 0.5.0 0.4.1 0.3.1 0.2.1 0.1.1

    SearchResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Response message for
SearchService.Search
method.

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `results` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/discoveryengine/latest/google.cloud.discoveryengine_v1.types.SearchResponse.SearchResult]` A list of matched documents. The order represents the ranking. |
| `facets` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/discoveryengine/latest/google.cloud.discoveryengine_v1.types.SearchResponse.Facet]` Results of facets requested by user. |
| `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. |
| `attribution_token` | `str` A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance. This also helps to identify a request during the customer support scenarios. |
| `redirect_uri` | `str` 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. |
| `next_page_token` | `str` 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. |
| `corrected_query` | `str` 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. |
| `summary` | `https://docs.cloud.google.com/python/docs/reference/discoveryengine/latest/google.cloud.discoveryengine_v1.types.SearchResponse.Summary` A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set. |
| `query_expansion_info` | `https://docs.cloud.google.com/python/docs/reference/discoveryengine/latest/google.cloud.discoveryengine_v1.types.SearchResponse.QueryExpansionInfo` Query expansion information for the returned results. |
| `natural_language_query_understanding_info` | `https://docs.cloud.google.com/python/docs/reference/discoveryengine/latest/google.cloud.discoveryengine_v1.types.SearchResponse.NaturalLanguageQueryUnderstandingInfo` Output only. Natural language query understanding information for the returned results. |
| `session_info` | `https://docs.cloud.google.com/python/docs/reference/discoveryengine/latest/google.cloud.discoveryengine_v1.types.SearchResponse.SessionInfo` Session information. Only set if SearchRequest.session is provided. See its description for more details. |
| `search_link_promotions` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/discoveryengine/latest/google.cloud.discoveryengine_v1.types.SearchLinkPromotion]` Promotions for site search. |
| `semantic_state` | `https://docs.cloud.google.com/python/docs/reference/discoveryengine/latest/google.cloud.discoveryengine_v1.types.SearchResponse.SemanticState` Output only. Indicates the semantic state of the search response. |

## Classes

### Facet

    Facet(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A facet result.

### NaturalLanguageQueryUnderstandingInfo

    NaturalLanguageQueryUnderstandingInfo(
        mapping=None, *, ignore_unknown_fields=False, **kwargs
    )

Information describing what natural language understanding
was done on the input query.

### QueryExpansionInfo

    QueryExpansionInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Information describing query expansion including whether
expansion has occurred.

### SearchResult

    SearchResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Represents the search results.

### SemanticState

    SemanticState(value)

Semantic state of the search response.

### SessionInfo

    SessionInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Information about the session.

### Summary

    Summary(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Summary of the top N search results specified by the summary
spec.