Giza.SphinxProtocol.field_weights
You're seeing just the function
field_weights
, go back to Giza.SphinxProtocol module for more information.
Link to this function
field_weights(query, field_weights)
Assign weights on a per field basis. Should be a list of fields from the query source of the indexes of your query. This will affect the weight of your query and can tilt phrase matching in favor of results from favored sources. The example below weighs results from the title as 50% more valued than results from the body text. Keep in mind any fields not listed keep their default of 1.
Examples
iex> Giza.SphinxProtocol.field_weights(query, [title: 3, body: 2])
{:giza_query, 'localhost', 9312, 0, 275,
"postsummary_fast_index postsummary_slow_index", 10, 25, 0, 0, 1000, 0, 4, "",
"", 0, "@group desc", "searchforme", [], 0, [], [title: 3, body: 2], 0}