Giza.SphinxProtocol.filter_exclude
You're seeing just the function
filter_exclude
, go back to Giza.SphinxProtocol module for more information.
Link to this function
filter_exclude(query, name, values)
Use one of your sphinx attributes to filter results to exclude the values you pass.
Examples
sphinx.conf:
source some_index : sql
{
...
sql_attr_uint = user_age
...
}
iex> Giza.SphinxProtocol.filter_exclude(query, 'user_age', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
{:giza_query, 'localhost', 9312, 0, 275,
"postsummary_fast_index postsummary_slow_index", 10, 25, 0, 0, 1000, 0, 4, "",
"", 0, "@group desc", "searchforme", [{:value, 'user_age', true, [1,2,3,4,5,6,7,8,9,10]}], 0, [], [], 0}
iex> Giza.SphinxProtocol.filter_exclude(query, 'user_age', 1, 10)
{:giza_query, 'localhost', 9312, 0, 275,
"postsummary_fast_index postsummary_slow_index", 10, 25, 0, 0, 1000, 0, 4, "",
"", 0, "@group desc", "searchforme", [{:range, 'user_age', true, {1,10}}], 0, [], [], 0}
Link to this function