Good morning,
This used to work fine:
options = {:retry_stale => true, :sort_mode => :extended, :order => '@rank
DESC', :per_page => 1000000, :sql_order => 'vintage_year DESC'}
options.merge!(:per_page => 10, :page => page) if use_pagination
results = Wine.search(string, options)
After the upgrade, it complains with:
Mysql2::Error: sphinxql: syntax error, unexpected USERVAR, expecting IDENT
(or 5 other tokens) near '@rank DESC LIMIT 0, 10; SHOW META'
I tried this:
options = {
:retry_stale => true,
:sort_mode => :extended,
:select => '*, @rank as custom_rank',
:order => :custom_rank,
:per_page => 1000000,
:sql_order => 'vintage_year DESC'
}
and that produces:
Mysql2::Error: index wine_core: parse error: Sphinx expr: syntax error,
unexpected TOK_USERVAR near '@rank'
What's the proper way of specifying this in the new version?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/thinking-sphinx/-/8rDDG7z8mP0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en.