# Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint (v2.8.0)

2.8.0 (latest) 2.7.0 2.6.2 2.5.0 2.4.0 2.3.1 2.2.0 2.1.1 2.0.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.2 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.2 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint.

Constraint expression of a number field. Example: price \< 100.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #comparison

    def comparison() -> ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison

**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SearchResponse-NaturalLanguageQueryUnderstandingInfo-StructuredExtractedFilter-NumberConstraint-Comparison)) --- The comparison operation performed between the field value and the value specified in the constraint.

### #comparison=

    def comparison=(value) -> ::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison

**Parameter**

- **value** ([::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SearchResponse-NaturalLanguageQueryUnderstandingInfo-StructuredExtractedFilter-NumberConstraint-Comparison)) --- The comparison operation performed between the field value and the value specified in the constraint.
**Returns**

- ([::Google::Cloud::DiscoveryEngine::V1::SearchResponse::NaturalLanguageQueryUnderstandingInfo::StructuredExtractedFilter::NumberConstraint::Comparison](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SearchResponse-NaturalLanguageQueryUnderstandingInfo-StructuredExtractedFilter-NumberConstraint-Comparison)) --- The comparison operation performed between the field value and the value specified in the constraint.

### #field_name

    def field_name() -> ::String

**Returns**

- (::String) --- Name of the numerical field as defined in the schema.

### #field_name=

    def field_name=(value) -> ::String

**Parameter**

- **value** (::String) --- Name of the numerical field as defined in the schema.
**Returns**

- (::String) --- Name of the numerical field as defined in the schema.

### #query_segment

    def query_segment() -> ::String

**Returns**

- (::String) --- Identifies the keywords within the search query that match a filter.

### #query_segment=

    def query_segment=(value) -> ::String

**Parameter**

- **value** (::String) --- Identifies the keywords within the search query that match a filter.
**Returns**

- (::String) --- Identifies the keywords within the search query that match a filter.

### #value

    def value() -> ::Float

**Returns**

- (::Float) --- The value specified in the numerical constraint.

### #value=

    def value=(value) -> ::Float

**Parameter**

- **value** (::Float) --- The value specified in the numerical constraint.
**Returns**

- (::Float) --- The value specified in the numerical constraint.