Hi Joe
Sphinx doesn't have any concept of key-value pairs for attributes, so I think
your first approach is almost certainly not going to be possible - particular
when adding facets to the mix.
However, if you call search_for_ids instead of search, then you will just get
your record ids back instead of full objects.
Hope this helps
--
Pat
On 17/12/2009, at 7:58 PM, Joe Simms wrote:
> Hi
>
> We have the following schema and I just wondered if we can configure
> facets in sphinx with this schema (basically dynamic attributes).
>
> Item has many attributes (attributes have a name column)
> Attribute has many values (values have a value column)
>
> So we want to facet like:
>
> Item.facets('term')
>
> =>
> {
> 'attribute name 1' :
> 'value 1' : count,
> 'value 2' : count
> 'attribute name 2' :
> 'value 3' : count.
> 'value 4' : count
> }
>
> I hope this makes sense?
>
> Or alternatively, can sphinx return me all the id's only of the
> records that match a search query, I can then use this to fetch facets
> from the database?
>
> Thanks
>
> Joe
>
> --
>
> 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.