Suppose i have a sphinx index named “worldcities” with the with the following fields / attributes:
country_id # int attribute
city # text field
accent_city # text field
and i run the following sphinxql query:
SELECT * FROM worldcities WHERE country_id = 16 AND MATCH((@(city,accent_city) "New Yor*"))
How does sphinx evaluates the query?:
Is it first searching through all the records and then filters the results by countr_id:
“give me all the results that start with ‘New Yor’ and the filter them by country_id”?
Or does it filter first by country id and the searches through the results:
“give me all the results that have countr_id = 16 then search in those”?
Hope i made myself clear
this one.
The full-text queries runs first. Then the filters ‘exclude’ non required matches.
btw, your query is missing some quotes, should be
Match function takes a string.