# Discovery Engine V1BETA API - Class Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec (v0.28.0)

0.28.0 (latest) 0.27.0 0.26.0 0.25.0 0.24.0 0.23.1 0.22.0 0.21.0 0.20.1 0.19.1 0.18.0 0.17.0 0.16.0 0.15.0 0.14.2 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.2 0.6.0 0.5.0 0.4.0 0.3.0 0.2.1 0.1.0 Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec.

Specification to enable natural language understanding capabilities for
search requests.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #allowed_field_names

    def allowed_field_names() -> ::Array<::String>

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

### #allowed_field_names=

    def allowed_field_names=(value) -> ::Array<::String>

**Parameter**

- **value** (::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.
**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.

### #extracted_filter_behavior

    def extracted_filter_behavior() -> ::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::ExtractedFilterBehavior

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::ExtractedFilterBehavior](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-ExtractedFilterBehavior)) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-FilterExtractionCondition "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition (module)") is set to [FilterExtractionCondition.ENABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-FilterExtractionCondition#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest__NaturalLanguageQueryUnderstandingSpec__FilterExtractionCondition__ENABLED "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition::ENABLED (constant)").

### #extracted_filter_behavior=

    def extracted_filter_behavior=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::ExtractedFilterBehavior

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::ExtractedFilterBehavior](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-ExtractedFilterBehavior)) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-FilterExtractionCondition "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition (module)") is set to [FilterExtractionCondition.ENABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-FilterExtractionCondition#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest__NaturalLanguageQueryUnderstandingSpec__FilterExtractionCondition__ENABLED "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition::ENABLED (constant)").
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::ExtractedFilterBehavior](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-ExtractedFilterBehavior)) --- 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-FilterExtractionCondition "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition (module)") is set to [FilterExtractionCondition.ENABLED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-FilterExtractionCondition#Google__Cloud__DiscoveryEngine__V1beta__SearchRequest__NaturalLanguageQueryUnderstandingSpec__FilterExtractionCondition__ENABLED "Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition::ENABLED (constant)").

### #filter_extraction_condition

    def filter_extraction_condition() -> ::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-FilterExtractionCondition)) --- The condition under which filter extraction should occur. Server behavior defaults to `DISABLED`.

### #filter_extraction_condition=

    def filter_extraction_condition=(value) -> ::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-FilterExtractionCondition)) --- The condition under which filter extraction should occur. Server behavior defaults to `DISABLED`.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::NaturalLanguageQueryUnderstandingSpec::FilterExtractionCondition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest/Google-Cloud-DiscoveryEngine-V1beta-SearchRequest-NaturalLanguageQueryUnderstandingSpec-FilterExtractionCondition)) --- The condition under which filter extraction should occur. Server behavior defaults to `DISABLED`.

### #geo_search_query_detection_field_names

    def geo_search_query_detection_field_names() -> ::Array<::String>

**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`.

### #geo_search_query_detection_field_names=

    def geo_search_query_detection_field_names=(value) -> ::Array<::String>

**Parameter**

- **value** (::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`.
**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`.