Hi David Is there anything else in the define_index block? And which versions of Thinking Sphinx and PostgreSQL are you using?
Also: when you say submodel, do you mean associated model? Or is there some inheritance as part of all of this? Cheers -- Pat On 25/08/2011, at 7:13 PM, David Krmpotic wrote: > Hello, > > I have a problem with indexing a submodel attribute. > > class Spot < ... > has_many :deals > > define_index do > indexes :name, company, description > indexes deals.title, :as => :deal > end > end > > I get this: ERROR: index 'spot_core': sql_range_query: ERROR: column > "spots.id" must appear in the GROUP BY clause or be used in an > aggregate function > LINE 1: SELECT "spots"."id" * 2 + 1 AS "id" , "spots"."name" AS > "nam... > > I'm using Postgres. > > The error disappears when I remove indexes deals.title, :as => :deal > > > Can you please help? > Thank you! > > David > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
