Class: Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo
- Inherits:
-
Object
- Object
- Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb
Overview
Information describing what natural language understanding was done on the input query.
Defined Under Namespace
Classes: StructuredExtractedFilter
Instance Attribute Summary collapse
-
#extracted_filters ⇒ ::String
The filters that were extracted from the input query.
-
#rewritten_query ⇒ ::String
Rewritten input query minus the extracted filters.
-
#structured_extracted_filter ⇒ ::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter
The filters that were extracted from the input query represented in a structured form.
Instance Attribute Details
#extracted_filters ⇒ ::String
Returns The filters that were extracted from the input query.
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 |
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1558 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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#rewritten_query ⇒ ::String
Returns Rewritten input query minus the extracted filters.
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 |
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1558 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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |
#structured_extracted_filter ⇒ ::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter
Returns The filters that were extracted from the input query represented in a structured form.
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 |
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1558 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::V1beta::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::V1beta::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::V1beta::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::V1beta::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::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::StringConstraint] # String constraint expression. # @!attribute [rw] number_constraint # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint] # Numerical constraint expression. # @!attribute [rw] geolocation_constraint # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::GeolocationConstraint] # Geolocation constraint expression. # @!attribute [rw] and_expr # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::AndExpression] # Logical "And" compound operator connecting multiple expressions. # @!attribute [rw] or_expr # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::OrExpression] # Logical "Or" compound operator connecting multiple expressions. class Expression include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end end |