When i set
ThinkingSphinx.search query,
 :order => 'weight DESC',
 :limit => 10,
 :indices => ['autocomplete_core']

(weigh is my custom field for sorting, not @weight)

I get error

sphinxql: syntax error, unexpected DESC, expecting '(' near 'DESC LIMIT 0, 10 
OPTION max_matches=10000; SHOW META'

*Console log*

Sphinx Query (3.6ms) SELECT * FROM `autocomplete_core` WHERE MATCH('а') AND 
> sphinx_deleted = 0 ORDER BY weight DESC LIMIT 0, 10 OPTION max_matches=10000
> Completed 500 Internal Server Error in 7ms
> ThinkingSphinx::SyntaxError (sphinxql: syntax error, unexpected DESC, 
> expecting '(' near 'DESC LIMIT 0, 10 OPTION max_matches=10000; SHOW META'):


When i set 
ThinkingSphinx.search query,
 :limit => 10,
 :indices => ['autocomplete_core']

searching work fine

AND

In other search, i get error

index product_core: parse error: Sphinx expr: syntax error, unexpected 
TOK_IDENT near 'product.id'

* Console log*

> Sphinx Query (2.9ms)  SELECT *, product.id, products.country FROM 
> `product_core` WHERE MATCH('a') AND sphinx_deleted = 0 LIMIT 0, 20 OPTION 
> max_matches=10000

Completed 500 Internal Server Error in 4ms
> ThinkingSphinx::ParseError (index product_core: parse error: Sphinx expr: 
> syntax error, unexpected TOK_IDENT near 'products.id'):
>

-- 
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