Class: Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec

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

Specification to enable natural language understanding capabilities for search requests.

Defined Under Namespace

Modules: ExtractedFilterBehavior, FilterExtractionCondition

Instance Attribute Summary collapse

Instance Attribute Details

#allowed_field_names::Array<::String>

Returns Optional. Allowlist of fields that can be used for natural language filter extraction. By default, if this is unspecified, all indexable fields are eligible for natural language filter extraction (but are not guaranteed to be used). If any fields are specified in allowed_field_names, only the fields that are both marked as indexable in the schema and specified in the allowlist will be eligible for natural language filter extraction. Note: for multi-datastore search, this is not yet supported, and will be ignored.

Returns:

  • (::Array<::String>)

    Optional. Allowlist of fields that can be used for natural language filter extraction. By default, if this is unspecified, all indexable fields are eligible for natural language filter extraction (but are not guaranteed to be used). If any fields are specified in allowed_field_names, only the fields that are both marked as indexable in the schema and specified in the allowlist will be eligible for natural language filter extraction. Note: for multi-datastore search, this is not yet supported, and will be ignored.



1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1232

class NaturalLanguageQueryUnderstandingSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Enum describing under which condition filter extraction should occur.
  module FilterExtractionCondition
    # Server behavior defaults to `DISABLED`.
    CONDITION_UNSPECIFIED = 0

    # Disables NL filter extraction.
    DISABLED = 1

    # Enables NL filter extraction.
    ENABLED = 2
  end

  # Enum describing how extracted filters are applied to the search.
  module ExtractedFilterBehavior
    # `EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED` will use the default behavior
    # for extracted filters. For single datastore search, the default is to
    # apply as hard filters. For multi-datastore search, the default is to
    # apply as soft boosts.
    EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED = 0

    # Applies all extracted filters as hard filters on the results. Results
    # that do not pass the extracted filters will not be returned in the
    # result set.
    HARD_FILTER = 1

    # Applies all extracted filters as soft boosts. Results that pass the
    # filters will be boosted up to higher ranks in the result set.
    SOFT_BOOST = 2
  end
end

#extracted_filter_behavior::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::ExtractedFilterBehavior

Returns Optional. Controls behavior of how extracted filters are applied to the search. The default behavior depends on the request. For single datastore structured search, the default is HARD_FILTER. For multi-datastore search, the default behavior is SOFT_BOOST. Location-based filters are always applied as hard filters, and the SOFT_BOOST setting will not affect them. This field is only used if SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition is set to FilterExtractionCondition.ENABLED.

Returns:



1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1232

class NaturalLanguageQueryUnderstandingSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Enum describing under which condition filter extraction should occur.
  module FilterExtractionCondition
    # Server behavior defaults to `DISABLED`.
    CONDITION_UNSPECIFIED = 0

    # Disables NL filter extraction.
    DISABLED = 1

    # Enables NL filter extraction.
    ENABLED = 2
  end

  # Enum describing how extracted filters are applied to the search.
  module ExtractedFilterBehavior
    # `EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED` will use the default behavior
    # for extracted filters. For single datastore search, the default is to
    # apply as hard filters. For multi-datastore search, the default is to
    # apply as soft boosts.
    EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED = 0

    # Applies all extracted filters as hard filters on the results. Results
    # that do not pass the extracted filters will not be returned in the
    # result set.
    HARD_FILTER = 1

    # Applies all extracted filters as soft boosts. Results that pass the
    # filters will be boosted up to higher ranks in the result set.
    SOFT_BOOST = 2
  end
end

#filter_extraction_condition::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition

Returns The condition under which filter extraction should occur. Server behavior defaults to DISABLED.

Returns:



1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1232

class NaturalLanguageQueryUnderstandingSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Enum describing under which condition filter extraction should occur.
  module FilterExtractionCondition
    # Server behavior defaults to `DISABLED`.
    CONDITION_UNSPECIFIED = 0

    # Disables NL filter extraction.
    DISABLED = 1

    # Enables NL filter extraction.
    ENABLED = 2
  end

  # Enum describing how extracted filters are applied to the search.
  module ExtractedFilterBehavior
    # `EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED` will use the default behavior
    # for extracted filters. For single datastore search, the default is to
    # apply as hard filters. For multi-datastore search, the default is to
    # apply as soft boosts.
    EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED = 0

    # Applies all extracted filters as hard filters on the results. Results
    # that do not pass the extracted filters will not be returned in the
    # result set.
    HARD_FILTER = 1

    # Applies all extracted filters as soft boosts. Results that pass the
    # filters will be boosted up to higher ranks in the result set.
    SOFT_BOOST = 2
  end
end

#geo_search_query_detection_field_names::Array<::String>

Returns Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to ENABLED.

Returns:

  • (::Array<::String>)

    Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to ENABLED.



1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
# File 'proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb', line 1232

class NaturalLanguageQueryUnderstandingSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Enum describing under which condition filter extraction should occur.
  module FilterExtractionCondition
    # Server behavior defaults to `DISABLED`.
    CONDITION_UNSPECIFIED = 0

    # Disables NL filter extraction.
    DISABLED = 1

    # Enables NL filter extraction.
    ENABLED = 2
  end

  # Enum describing how extracted filters are applied to the search.
  module ExtractedFilterBehavior
    # `EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED` will use the default behavior
    # for extracted filters. For single datastore search, the default is to
    # apply as hard filters. For multi-datastore search, the default is to
    # apply as soft boosts.
    EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED = 0

    # Applies all extracted filters as hard filters on the results. Results
    # that do not pass the extracted filters will not be returned in the
    # result set.
    HARD_FILTER = 1

    # Applies all extracted filters as soft boosts. Results that pass the
    # filters will be boosted up to higher ranks in the result set.
    SOFT_BOOST = 2
  end
end