Class: Google::Cloud::DiscoveryEngine::V1::SearchResponse
- Inherits:
-
Object
- Object
- Google::Cloud::DiscoveryEngine::V1::SearchResponse
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/discoveryengine/v1/search_service.rb
Overview
Response message for SearchService.Search method.
Defined Under Namespace
Modules: SemanticState Classes: Facet, NaturalLanguageQueryUnderstandingInfo, QueryExpansionInfo, SearchResult, SessionInfo, Summary
Instance Attribute Summary collapse
-
#attribution_token ⇒ ::String
A unique search token.
-
#corrected_query ⇒ ::String
Contains the spell corrected query, if found.
-
#facets ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet>
Results of facets requested by user.
-
#natural_language_query_understanding_info ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo
readonly
Output only.
-
#next_page_token ⇒ ::String
A token that can be sent as SearchRequest.page_token to retrieve the next page.
-
#query_expansion_info ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::QueryExpansionInfo
Query expansion information for the returned results.
-
#redirect_uri ⇒ ::String
The URI of a customer-defined redirect page.
-
#results ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult>
A list of matched documents.
-
#search_link_promotions ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::SearchLinkPromotion>
Promotions for site search.
-
#semantic_state ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SemanticState
readonly
Output only.
-
#session_info ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SessionInfo
Session information.
-
#summary ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary
A summary as part of the search results.
-
#total_size ⇒ ::Integer
The estimated total count of matched items irrespective of pagination.
Instance Attribute Details
#attribution_token ⇒ ::String
Returns 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.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#corrected_query ⇒ ::String
Returns 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.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#facets ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet>
Returns Results of facets requested by user.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#natural_language_query_understanding_info ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo (readonly)
Output only. Natural language query understanding information for the returned results.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#next_page_token ⇒ ::String
Returns 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.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#query_expansion_info ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::QueryExpansionInfo
Returns Query expansion information for the returned results.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#redirect_uri ⇒ ::String
Returns 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.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#results ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult>
Returns A list of matched documents. The order represents the ranking.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#search_link_promotions ⇒ ::Array<::Google::Cloud::DiscoveryEngine::V1::SearchLinkPromotion>
Returns Promotions for site search.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#semantic_state ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SemanticState (readonly)
Returns Output only. Indicates the semantic state of the search response.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#session_info ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SessionInfo
Returns Session information.
Only set if SearchRequest.session is provided. See its description for more details.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#summary ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary
Returns A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |
#total_size ⇒ ::Integer
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.
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1419 class SearchResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the search results. # @!attribute [rw] id # @return [::String] # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} of the # searched {::Google::Cloud::DiscoveryEngine::V1::Document Document}. # @!attribute [rw] document # @return [::Google::Cloud::DiscoveryEngine::V1::Document] # The document data snippet in the search response. Only fields that are # marked as `retrievable` are populated. # @!attribute [rw] chunk # @return [::Google::Cloud::DiscoveryEngine::V1::Chunk] # The chunk data in the search response if the # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode} # is set to # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}. # @!attribute [r] model_scores # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}] # Output only. Google provided available scores. # @!attribute [rw] rank_signals # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals] # Optional. A set of ranking signals associated with the result. class SearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A set of ranking signals. # @!attribute [rw] keyword_similarity_score # @return [::Float] # Optional. Keyword matching adjustment. # @!attribute [rw] relevance_score # @return [::Float] # Optional. Semantic relevance adjustment. # @!attribute [rw] semantic_similarity_score # @return [::Float] # Optional. Semantic similarity adjustment. # @!attribute [rw] pctr_rank # @return [::Float] # Optional. Predicted conversion rate adjustment as a rank. # @!attribute [rw] topicality_rank # @return [::Float] # Optional. Topicality adjustment as a rank. # @!attribute [rw] document_age # @return [::Float] # Optional. Age of the document in hours. # @!attribute [rw] boosting_factor # @return [::Float] # Optional. Combined custom boosts for a doc. # @!attribute [rw] default_rank # @return [::Float] # Optional. The default rank of the result. # @!attribute [rw] custom_signals # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SearchResult::RankSignals::CustomSignal>] # Optional. A list of custom clearbox signals. class RankSignals include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Custom clearbox signal represented by name and value pair. # @!attribute [rw] name # @return [::String] # Optional. Name of the signal. # @!attribute [rw] value # @return [::Float] # Optional. Float value representing the ranking signal (e.g. 1.25 for # BM25). class CustomSignal include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList] class ModelScoresEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A facet result. # @!attribute [rw] key # @return [::String] # The key for this facet. For example, `"colors"` or `"price"`. It matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#key SearchRequest.FacetSpec.FacetKey.key}. # @!attribute [rw] values # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Facet::FacetValue>] # The facet values for this field. # @!attribute [rw] dynamic_facet # @return [::Boolean] # Whether the facet is dynamically generated. class Facet include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A facet value which contains value names and their count. # @!attribute [rw] value # @return [::String] # Text value of a facet, such as "Black" for facet "colors". # # Note: The following fields are mutually exclusive: `value`, `interval`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] interval # @return [::Google::Cloud::DiscoveryEngine::V1::Interval] # Interval value for a facet, such as [10, 20) for facet "price". It # matches # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec::FacetKey#intervals SearchRequest.FacetSpec.FacetKey.intervals}. # # Note: The following fields are mutually exclusive: `interval`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] count # @return [::Integer] # Number of items that have this facet value. class FacetValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary of the top N search results specified by the summary spec. # @!attribute [rw] summary_text # @return [::String] # The summary content. # @!attribute [rw] summary_skipped_reasons # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummarySkippedReason>] # Additional summary-skipped reasons. This provides the reason for ignored # cases. If nothing is skipped, this field is not set. # @!attribute [rw] safety_attributes # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SafetyAttributes] # A collection of Safety Attribute categories and their associated # confidence scores. # @!attribute [rw] summary_with_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::SummaryWithMetadata] # Summary with metadata information. class Summary include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Safety Attribute categories and their associated confidence scores. # @!attribute [rw] categories # @return [::Array<::String>] # The display names of Safety Attribute categories associated with the # generated content. Order matches the Scores. # @!attribute [rw] scores # @return [::Array<::Float>] # The confidence scores of the each category, higher # value means higher confidence. Order matches the Categories. class SafetyAttributes include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation metadata. # @!attribute [rw] citations # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Citation>] # Citations for segments. class CitationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation info for a segment. # @!attribute [rw] start_index # @return [::Integer] # Index indicates the start of the segment, measured in bytes/unicode. # @!attribute [rw] end_index # @return [::Integer] # End of the attributed segment, exclusive. # @!attribute [rw] sources # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationSource>] # Citation sources for the attributed segment. class Citation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Citation source. # @!attribute [rw] reference_index # @return [::Integer] # Document reference index from SummaryWithMetadata.references. # It is 0-indexed and the value will be zero if the reference_index is # not set explicitly. class CitationSource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Document reference. # @!attribute [rw] title # @return [::String] # Title of the document. # @!attribute [rw] document # @return [::String] # Required. # {::Google::Cloud::DiscoveryEngine::V1::Document#name Document.name} of the # document. Full resource name of the referenced document, in the format # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. # @!attribute [rw] uri # @return [::String] # Cloud Storage or HTTP uri for the document. # @!attribute [rw] chunk_contents # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference::ChunkContent>] # List of cited chunk contents derived from document content. class Reference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Chunk content. # @!attribute [rw] content # @return [::String] # Chunk textual content. # @!attribute [rw] page_identifier # @return [::String] # Page identifier. class ChunkContent include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Summary with metadata information. # @!attribute [rw] summary # @return [::String] # Summary text with no citation information. # @!attribute [rw] citation_metadata # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::CitationMetadata] # Citation metadata for given summary. # @!attribute [rw] references # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::Summary::Reference>] # Document References. class SummaryWithMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An Enum for summary-skipped reasons. module SummarySkippedReason # Default value. The summary skipped reason is not specified. SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0 # The adversarial query ignored case. # # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query} # is set to `true`. ADVERSARIAL_QUERY_IGNORED = 1 # The non-summary seeking query ignored case. # # Google skips the summary if the query is chit chat. # Only used when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query} # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED = 2 # The out-of-domain query ignored case. # # Google skips the summary if there are no high-relevance search results. # For example, the data store contains facts about company A but the # user query is asking questions about company B. OUT_OF_DOMAIN_QUERY_IGNORED = 3 # The potential policy violation case. # # Google skips the summary if there is a potential policy violation # detected. This includes content that may be violent or toxic. POTENTIAL_POLICY_VIOLATION = 4 # The LLM addon not enabled case. # # Google skips the summary if the LLM addon is not enabled. LLM_ADDON_NOT_ENABLED = 5 # The no relevant content case. # # Google skips the summary if there is no relevant content in the # retrieved search results. NO_RELEVANT_CONTENT = 6 # The jail-breaking query ignored case. # # For example, "Reply in the tone of a competing company's CEO". # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] # is set to `true`. JAIL_BREAKING_QUERY_IGNORED = 7 # The customer policy violation case. # # Google skips the summary if there is a customer policy violation # detected. The policy is defined by the customer. CUSTOMER_POLICY_VIOLATION = 8 # The non-answer seeking query ignored case. # # Google skips the summary if the query doesn't have clear intent. # Only used when # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] # is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9 # The time out case. # # Google skips the summary if the time out. TIME_OUT = 10 end end # Information describing query expansion including whether expansion has # occurred. # @!attribute [rw] expanded_query # @return [::Boolean] # Bool describing whether query expansion has occurred. # @!attribute [rw] pinned_result_count # @return [::Integer] # Number of pinned results. This field will only be set when expansion # happens and # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::QueryExpansionSpec#pin_unexpanded_results SearchRequest.QueryExpansionSpec.pin_unexpanded_results} # is set to true. class QueryExpansionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Information describing what natural language understanding was # done on the input query. # @!attribute [rw] extracted_filters # @return [::String] # The filters that were extracted from the input query. # @!attribute [rw] rewritten_query # @return [::String] # Rewritten input query minus the extracted filters. # @!attribute [rw] classified_intents # @return [::Array<::String>] # The classified intents from the input query. # @!attribute [rw] structured_extracted_filter # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter] # The filters that were extracted from the input query represented in a # structured form. class NaturalLanguageQueryUnderstandingInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The filters that were extracted from the input query represented in a # structured form. # @!attribute [rw] expression # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::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. class StructuredExtractedFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Constraint expression of a string field. # @!attribute [rw] field_name # @return [::String] # Name of the string field as defined in the schema. # @!attribute [rw] values # @return [::Array<::String>] # Values of the string field. The record will only be returned if the # field value matches one of the values specified here. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class StringConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Constraint expression of a number field. Example: price < 100. # @!attribute [rw] field_name # @return [::String] # Name of the numerical field as defined in the schema. # @!attribute [rw] comparison # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison] # The comparison operation performed between the field value and the # value specified in the constraint. # @!attribute [rw] value # @return [::Float] # The value specified in the numerical constraint. # @!attribute [rw] query_segment # @return [::String] # Identifies the keywords within the search query that match a filter. class NumberConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The comparison operation that was performed. module Comparison # Undefined comparison operator. COMPARISON_UNSPECIFIED = 0 # Denotes equality `=` operator. EQUALS = 1 # Denotes less than or equal to `<=` operator. LESS_THAN_EQUALS = 2 # Denotes less than `<` operator. LESS_THAN = 3 # Denotes greater than or equal to `>=` operator. GREATER_THAN_EQUALS = 4 # Denotes greater than `>` operator. GREATER_THAN = 5 end end # Constraint of a geolocation field. # Name of the geolocation field as defined in the schema. # @!attribute [rw] field_name # @return [::String] # The name of the geolocation field as defined in the schema. # @!attribute [rw] address # @return [::String] # 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. # @!attribute [rw] latitude # @return [::Float] # The latitude of the geolocation inferred from the input query. # @!attribute [rw] longitude # @return [::Float] # The longitude of the geolocation inferred from the input query. # @!attribute [rw] radius_in_meters # @return [::Float] # The radius in meters around the address. The record is returned if # the location of the geolocation field is within the radius. class GeolocationConstraint include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `And` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ANDed together. class AndExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Logical `Or` operator. # @!attribute [rw] expressions # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::Expression>] # The expressions that were ORed together. class OrExpression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The expression denoting the filter that was extracted from the input # query. # @!attribute [rw] string_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # # Note: The following fields are mutually exclusive: `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # # Note: The following fields are mutually exclusive: `number_constraint`, `string_constraint`, `geolocation_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # # Note: The following fields are mutually exclusive: `geolocation_constraint`, `string_constraint`, `number_constraint`, `and_expr`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `and_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `or_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. # # Note: The following fields are mutually exclusive: `or_expr`, `string_constraint`, `number_constraint`, `geolocation_constraint`, `and_expr`. If a field in that set is populated, all other fields in the set will automatically be cleared. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end # Information about the session. # @!attribute [rw] name # @return [::String] # Name of the session. # If the auto-session mode is used (when # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session} # ends with "-"), this field holds the newly generated session name. # @!attribute [rw] query_id # @return [::String] # 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. class SessionInfo include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Semantic state of the search response. module SemanticState # Default value. Should not be used. SEMANTIC_STATE_UNSPECIFIED = 0 # Semantic search was disabled for this search response. DISABLED = 1 # Semantic search was enabled for this search response. ENABLED = 2 end end |