RomanStruk/manticore-scout-engine

How to use raw sort condition

cevin opened this issue · 2 comments

cevin commented
model::search('keyword')->orderBy('weight()', 'desc')
"sphinxql: syntax error, unexpected $undefined near '`weight()` desc, `id` desc limit 20 OPTION max_matches=1000;'"

model::search('keyword', fn($builder) => $builder->orderByRaw('weight() DESC'))->get();

Scout builder does not support sorting by expression