Class: Orchestrate::Search::DistanceBuilder
- Inherits:
-
RangeBuilder
- Object
- RangeBuilder
- Orchestrate::Search::DistanceBuilder
- Defined in:
- lib/orchestrate/search/aggregate_builder.rb
Overview
Distance Builder object for constructing distance functions for the aggregate param
Instance Attribute Summary
Attributes inherited from RangeBuilder
#builder, #field_name, #ranges
Instance Method Summary collapse
-
#to_param ⇒ #to_s
Constructed aggregate string clause.
-
#to_s ⇒ Object
(also: #inspect)
Pretty-Printed string representation of the DistanceBuilder object.
Methods inherited from RangeBuilder
#above, #below, #between, #initialize
Constructor Details
This class inherits a constructor from Orchestrate::Search::RangeBuilder
Instance Method Details
#to_param ⇒ #to_s
Returns constructed aggregate string clause.
228 229 230 |
# File 'lib/orchestrate/search/aggregate_builder.rb', line 228 def to_param "#{field_name}:distance:#{ranges}" end |
#to_s ⇒ Object Also known as: inspect
Returns Pretty-Printed string representation of the DistanceBuilder object.
222 223 224 |
# File 'lib/orchestrate/search/aggregate_builder.rb', line 222 def to_s "#<Orchestrate::Search::DistanceBuilder collection=#{collection.name} field_name=#{field_name} ranges=#{ranges}>" end |