Q:

sphinx emit (discard) search fields

Suppose we have some search params like (author, genre, cost) and we have to get N=15 rows
Query : select ... where author=a and genre=b and cost=b LIMIT N
We have to get N rows, but we found only 2 rows. Then we have to emit param cost. 
Query : select ... where author=a and genre=b LIMIT N
now we have 10 < N rows, so we have to emit author
Query : select ... where author=a LIMIT N and so on.. 
How to make it in right way (i think to make multi queries is expensive, 
to make query like: select if (author=a and genre=b and cost=c, 1, 0) as f, if (author=a and genre=b, 1, 0) as s, ... order by f desc, s desc, ...
is expensive too because table has more 500 000 rows

A:

You can probably make it a bit more efficient, with 
select ...,author=a + genre=b + cost=c as f from order by d desc

(if want to maintain priority can do (author=a * 4) + ... etc)
But in general, you have no MATCH() so the query will ALWAYS be a full-table scan. It will have to inspect and potentially sort EVERY row in the table. 
There is no way to make it truly efficient. (Other than pre-computing values and storing them in the index - could even precompute values in fields to take advantage of the full-text index) 

