Class: Google::Apis::CloudsearchV1::Filter

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_v1/representations.rb

Overview

A generic way of expressing filters in a query, which supports two approaches: 1. Setting a ValueFilter. The name must match an operator_name defined in the schema for your data source. 2. Setting a CompositeFilter. The filters are evaluated using the logical operator. The top-level operators can only be either an AND or a NOT. AND can appear only at the top-most level. OR can appear only under a top-level AND.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Filter

Returns a new instance of Filter.



1273
1274
1275
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1273

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#composite_filterGoogle::Apis::CloudsearchV1::CompositeFilter

Corresponds to the JSON property compositeFilter



1266
1267
1268
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1266

def composite_filter
  @composite_filter
end

#value_filterGoogle::Apis::CloudsearchV1::ValueFilter

Corresponds to the JSON property valueFilter



1271
1272
1273
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1271

def value_filter
  @value_filter
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1278
1279
1280
1281
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 1278

def update!(**args)
  @composite_filter = args[:composite_filter] if args.key?(:composite_filter)
  @value_filter = args[:value_filter] if args.key?(:value_filter)
end