Class: Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec
- Inherits:
-
Object
- Object
- Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/discoveryengine/v1/search_service.rb
Overview
Specification to enable natural language understanding capabilities for search requests.
Defined Under Namespace
Modules: ExtractedFilterBehavior, FilterExtractionCondition
Instance Attribute Summary collapse
-
#allowed_field_names ⇒ ::Array<::String>
Optional.
-
#extracted_filter_behavior ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec::ExtractedFilterBehavior
Optional.
-
#filter_extraction_condition ⇒ ::Google::Cloud::DiscoveryEngine::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition
The condition under which filter extraction should occur.
-
#geo_search_query_detection_field_names ⇒ ::Array<::String>
Field names used for location-based filtering, where geolocation filters are detected in natural language search queries.
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.
1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1108 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::V1::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.
1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1108 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::V1::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition
Returns The condition under which filter extraction should occur.
Server behavior defaults to DISABLED.
1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1108 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.
If this field is set, it overrides the field names set in [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1.ServingConfig.geo_search_query_detection_field_names].
1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 |
# File 'proto_docs/google/cloud/discoveryengine/v1/search_service.rb', line 1108 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 |