Class: Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::NaturalLanguageQueryUnderstandingInfo

Inherits:
Object
  • Object
show all
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

Instance Attribute Details

#extracted_filters::String

Returns The filters that were extracted from the input query.

Returns:

  • (::String)

    The filters that were extracted from the input query.



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
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1432

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.
    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.
    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] 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.

Returns:

  • (::String)

    Rewritten input query minus the extracted filters.



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
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1432

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.
    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.
    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] 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.

Returns:



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
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1432

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.
    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.
    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] 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