D
D
Dmitry Mironov2016-11-29 16:23:21
Sphinx
Dmitry Mironov, 2016-11-29 16:23:21

Can sphinx add an attribute from a query?

Users have many posts, posts have many likes. You need to count the number of likes for all user posts. Currently, this is done using sphinx via sql_attr_uint, and the amount itself is calculated via a nested query (mysql). I would like to at least get away from nested queries, for example, use sql_attr_multi and select the number of likes in it, but you cannot sort by this field. Is there a way to put an attribute in a select so that you can eventually sort by it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2016-11-30
@opium

I don't remember there being such a possibility.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question