Giza.SphinxProtocol.filter_include
You're seeing just the function
filter_include
, go back to Giza.SphinxProtocol module for more information.
Link to this function
filter_include(query, name, values)
Use one of your sphinx attributes to filter results down to the values you pass.
Examples
sphinx.conf:
source some_index : sql
{
...
sql_attr_uint = user_age
...
}
iex> Giza.SphinxProtocol.filter_include(query, 'user_age', [50, 60, 70])
{: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', false, [50,60,70]}], 0, [], [], 0}
iex> Giza.SphinxProtocol.filter_include(query, 'user_age', 50, 60])
{: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', false, {50,60}}], 0, [], [], 0}
Link to this function