Giza.SphinxProtocol.index_weights
You're seeing just the function
index_weights
, go back to Giza.SphinxProtocol module for more information.
Link to this function
index_weights(query, weights)
Assign additional weight to be added to each of your index on the passed query. If you have results from index_a and
index_b with weight results 2 and 3 and use the below example call, your document weight will be 2 30 + 3 80 = 300.
Without weights sphinx would simple choose the latter index if the document is found in both indexes (3). This can be useful
depending on how your data is partitioned or doing more complex searches from multiple sources.
Examples
iex> Giza.SphinxProtocol.geo(query, [postsummary_fast_index: 30, postsummary_slow_index: 80])
{:giza_query, 'localhost', 9312, 0, 275,
"postsummary_fast_index postsummary_slow_index", 10, 25, 0, 0, 1000, 0, 4, "",
"", 0, "@group desc", "searchforme", [], 0, [postsummary_fast_index: 30, postsummary_slow_index: 80], [], 0}