Class: Hyperion::Riak::BucketStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/hyperion/riak/optimized_filter_order.rb

Instance Method Summary collapse

Constructor Details

#initialize(filters, bucket_name) ⇒ BucketStrategy

Returns a new instance of BucketStrategy.



87
88
89
90
# File 'lib/hyperion/riak/optimized_filter_order.rb', line 87

def initialize(filters, bucket_name)
  @filters = filters
  @bucket_name = bucket_name
end

Instance Method Details

#can_optimize?Boolean

Returns:

  • (Boolean)


92
93
94
# File 'lib/hyperion/riak/optimized_filter_order.rb', line 92

def can_optimize?
  true
end

#filtersObject



104
105
106
# File 'lib/hyperion/riak/optimized_filter_order.rb', line 104

def filters
  @filters
end

#optimal_index_fieldObject



96
97
98
# File 'lib/hyperion/riak/optimized_filter_order.rb', line 96

def optimal_index_field
  '$bucket'
end

#optimal_index_valueObject



100
101
102
# File 'lib/hyperion/riak/optimized_filter_order.rb', line 100

def optimal_index_value
  @bucket_name
end