G'Day.

I have a problem when trying to group my results...

Here's (the important part of) my define_index block:

  define_index do
    indexes :name, :sortable => true
    indexes :price_in_cents, :sortable => true

    has :equivalent_products_group_id

    set_property :delta => true
  end

Now, when i do a query like this

Product.search(:order => :price_in_cents, :group_by =>
"equivalent_products_group_id", :group_function => :attr)

it returns the correct results. But as soon as i specify a
group_clause option, like this

Product.search(:order => :price_in_cents, :group_by =>
"equivalent_products_group_id", :group_function
=> :attr, :group_clause => "name")

it returns an empty result set. The only time the group clause option
seems to work, is when i use it with "@group" or "@count". I played
around with the index (changing fields to attributes, ...) - without
success.

Help would be highly appreciated! Thanks
Tom

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

Reply via email to