pat / riddle

Ruby Client API for Sphinx
MIT License
136 stars 67 forks source link

Allow group_by multiple fields #84

Closed jogaco closed 10 years ago

jogaco commented 10 years ago

According to Sphinx, it is possible to do a group_by on multiple fields since version 2.1.2: http://sphinxsearch.com/bugs/view.php?id=1453. However, when issuing a ThinkingSphinx search grouping by two fields (user_id, type), the query is not well constructed:

MyClass.search :with => {:some_id => 85}, :group_by => "user_id, type"
ThinkingSphinx::SyntaxError: sphinxql: syntax error, unexpected $undefined, expecting IDENT (or 5 other tokens) near '`user_id,` type LIMIT 0, 20; SHOW META'
pat commented 10 years ago

Thanks for the fix :)