Class: Sunspot::Query::FieldFunctionQuery
- Inherits:
-
FunctionQuery
- Object
- FunctionQuery
- Sunspot::Query::FieldFunctionQuery
- Defined in:
- lib/sunspot/query/function_query.rb
Overview
Function query which represents a field.
Instance Method Summary collapse
-
#initialize(field) ⇒ FieldFunctionQuery
constructor
A new instance of FieldFunctionQuery.
- #to_s ⇒ Object
Methods inherited from FunctionQuery
Constructor Details
#initialize(field) ⇒ FieldFunctionQuery
Returns a new instance of FieldFunctionQuery.
32 33 34 |
# File 'lib/sunspot/query/function_query.rb', line 32 def initialize(field) @field = field end |
Instance Method Details
#to_s ⇒ Object
36 37 38 |
# File 'lib/sunspot/query/function_query.rb', line 36 def to_s "#{escape(@field.indexed_name)}" << (@boost_amount ? "^#{@boost_amount}" : "") end |