Answer the question
In order to leave comments, you need to log in
How in Sphinx to consider ctr when searching?
There is a base with fields id, title, description and ctr (float type). ctr=clicks/impressions and recalculates once per minute.
indexer --all --rotate runs every 10 minutes.
sphinx.conf
sql_query = SELECT id, title, description, ctr FROM posts
sql_attr_float = ctr
$sphinx_sql = " SELECT * FROM sphinxdata WHERE MATCH ('\"$search_key\"/1') LIMIT 500 OPTION ranker=proximity_bm25 ";
$sql = " SELECT * FROM posts WHERE id IN ($ids) ";
Answer the question
In order to leave comments, you need to log in
@portfelio thanks. And so he did. It turned out that it was necessary to update 2.0.8 to 2.1.5 manually. There some bug with ORDER BY was corrected.
And yet this request was incorrect:
It is necessary:
I understand correctly that sorting by super_ctr occurs after the data and weight are received?
And in order to take ctr into account when receiving data, you need to rewrite the formula inOPTION ranker=
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question