Hi Andre

You can use :group_distinct in your search queries - I've no idea if it'll work 
as part of facet requests, though. Let us know how you go :)

Cheers

-- 
Pat

On 13/10/2011, at 10:49 AM, Andre Lahs wrote:

> Hi,
> 
> I have the following simplified product datamodel:
> 
> id, name, group_id, category_id
> 
> and I have a facet defined on the category that allows me to find out
> the actual number of products within a category.
> 
> What I like to know is, how many distinct groups (-> group_id) I have
> within a category. For example:
> 
> 1, 'Product A', 'Group A', 'Category A'
> 2, 'Product B', 'Group A', 'Category A'
> 3, 'Product C', 'Group C', 'Category B'
> 4, 'Product D', 'Group D', 'Category B'
> 
> What I currently get is:
> 
> Category A (2)
> Category B (2)
> 
> What I like to get is:
> 
> Category A (1)
> Category B (2)
> 
> ------
> 
> Is there a way to do this with thinkingsphinx and its facets support?
> 
> I looked at the sphinx docs and found the SetGroupDistinct function
> (http://sphinxsearch.com/docs/manual-0.9.9.html#api-func-
> setgroupdistinct) that seems to be a solution to my problem. Is there
> a way to use it in thinkingsphinx?
> 
> Thanks for your help,
> 
> Andre
> 
> -- 
> 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.

Reply via email to