Method: FunctionScores::RandomScoreFunctionBuilder#function
- Defined in:
- lib/function_scores/random_score_function_builder.rb
#function ⇒ Hash
Returns serailized json query for the object.
14 15 16 17 18 19 20 21 |
# File 'lib/function_scores/random_score_function_builder.rb', line 14 def function function = {} rs_query = super rs_query[:field] = @field if field.present? rs_query[:seed] = @seed if seed.present? function[name.intern] = rs_query function end |