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

#classified_intents::Array<::String>

Returns The classified intents from the input query.

Returns:

  • (::Array<::String>)

    The classified intents from the input query.



2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 2075

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.
    #
    #     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::V1beta::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::V1beta::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::V1beta::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::V1beta::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

#extracted_filters::String

Returns The filters that were extracted from the input query.

Returns:

  • (::String)

    The filters that were extracted from the input query.



2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 2075

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.
    #
    #     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::V1beta::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::V1beta::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::V1beta::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::V1beta::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

#rewritten_query::String

Returns Rewritten input query minus the extracted filters.

Returns:

  • (::String)

    Rewritten input query minus the extracted filters.



2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 2075

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.
    #
    #     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::V1beta::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::V1beta::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::V1beta::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::V1beta::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

#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:



2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 2075

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.
    #
    #     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::V1beta::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::V1beta::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::V1beta::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::V1beta::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