What version of the mysql2 gem are you using? You need to be on 0.3.12b4 or
newer (earlier versions throw that inject error you're seeing).
Also: weight is a function in Sphinx's SphinxQL syntax, so that's what's
causing the syntax error. You can try escaping your attribute reference with
backticks:
ThinkingSphinx.search query,
:order => '`weight` DESC',
:limit => 10,
:indices => 'autocomplete_core'
But I'd recommend renaming your attribute to something else so the conflict is
avoided without you needing to escape every reference to it.
On 16/05/2013, at 2:00 PM, Георгий wrote:
> Sorry
>
> products.id
>
> index product_core: parse error: Sphinx expr: syntax error, unexpected
> TOK_IDENT near 'products.id'
>
> and somitimes when i refresh page i get
>
> NoMethodError in SearchController#index
>
> undefined method `inject' for nil:NilClass
>
> --
> 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.