Thank you Pat, everything is quite ok now :0)
It seems that i can't order with RAND() and ASC at the same time.
Ithink i've read somewhere (maybe it was you) that we can't do both, so i 
choose RAND().
Thanks for the fix.

Le mardi 29 octobre 2013 22:56:47 UTC+1, Pat Allan a écrit :
>
> Hi Nataly 
>
> You’ll want to do two things. Firstly, update/add Riddle in your Gemfile: 
>
>   gem ‘riddle’, ‘~> 1.5.9’, 
>     :git    => ‘git://github.com/pat/riddle.git', 
>     :branch => ‘develop’, 
>     :ref    => ‘01d35a37b8’ 
>
> And then, change @random to RAND(). I pushed a fix for Riddle to avoid 
> escaping functions yesterday, hence why you’ll need that latest commit, and 
> SphinxQL expects RAND() instead of @random (Sphinx is deprecating special 
> @-variables and replacing them with functions). 
>
> Cheers 
>
> — 
> Pat 
>
> On 30 Oct 2013, at 3:55 am, [email protected] <javascript:> wrote: 
>
> > Hello, 
> > 
> > Since we have updated to version 3.0.6 we have an error with the random 
> sorting : 
> > ThinkingSphinx::SyntaxError (sphinxql: syntax error, unexpected USERVAR, 
> expecting IDENT (or 5 other tokens) near '@random ASC LIMIT 0, 40 OPTION 
> max_matches=10 000; SHOW META'): 
> > Has the syntax changed? 
> > 
> > Here what i can see in the model (sorry i'm new to ruby and rails) : 
> > sphinx_scope(:by_random) { 
> >     {:sort_mode => :extended, :order =>'@random ASC'} 
> >   } 
> > 
> > Thank in advance for your help, 
> > 
> > Nataly 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Thinking Sphinx" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected] <javascript:>. 
> > To post to this group, send email to 
> > [email protected]<javascript:>. 
>
> > Visit this group at http://groups.google.com/group/thinking-sphinx. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to