Class: Orchestrate::Search::DistanceBuilder

Inherits:
RangeBuilder show all
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

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.

Returns:

  • (#to_s)

    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_sObject Also known as: inspect

Returns Pretty-Printed string representation of the DistanceBuilder object.

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