I guess status is a reserved keyword for Sphinx - but you can wrap column names 
in backticks, so try the following:

  Order.search 'kropka', :order => "`status` ASC"

On 26/04/2013, at 8:06 PM, jkropka wrote:

> Hello,
> 
> I have set up everything on ubuntu, latest branch of the gem (3.0.2) and 
> everyhting works perfectly
> until I try to order my results by the status field in my table. 
> 
> Is status a reserved keyword for TS? 
> 
> If so, how can I work around this without having to rename my table's column?
> 
> Example:
> rails c
> irb(main):001:0> Order.search "kropka", :order => :status
> ThinkingSphinx::SyntaxError: sphinxql: syntax error, unexpected STATUS, 
> expecting IDENT (or 5 other tokens) near 'status ASC LIMIT 0, 20; SHOW META'
> 
>   John
> 
> 
> 
> 
> -- 
> 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?hl=en.
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to