Hi Thibaut,

You might want to check out this thread as well:

http://groups.google.com/group/thinking-sphinx/browse_thread/thread/97761b3ac64cfa0a

Bye,

Ward

On Sep 3, 10:24 am, Thibaut Barrère <[email protected]> wrote:
> Hi Pat,
>
> > if you could check and let me know, that'd be fantastic.
>
> Sure! I switched from:
>
> indexes tags.name, :as => :tag, :facet => true
>
> to
>
> has tags.name, :as => :tag, :facet => true
>
> Item.facets is now very fast, but it returns { ..., :tag => { :nil =>
> 43 }} instead of anything usable like  { ... :tag => { "video" =>
> 10, ... }}
>
> Am I using the syntax in a wrong way ?
>
> By the way if it has any importance, my schema is:
>
> Item (id) <=> Taggings (tag_id, taggable_id, ...) <=> Tags (id, name)
>
> -- Thibaut
>
> On Sep 2, 5:56 pm, Pat Allan <[email protected]> wrote:
>
>
>
> > Hi Thibaut
>
> > I'm not yet sure what the cause of the slowness is - but you're not  
> > the first to report it. I'm not sure if attributes will be much faster  
> > - if you could check and let me know, that'd be fantastic.
>
> > Cheers
>
> > --
> > Pat
>
> > On 02/09/2009, at 5:03 PM, Thibaut Barrère wrote:
>
> > > I guess it's probably:
>
> > > indexes tags.name, :as => :tag, :facet => true
>
> > > that is slowing the processing.
>
> > > Should I be using attributes here to get a faster result ? Could I use
> > > facets with those ?
>
> > > -- Thibaut
>
> > > On Sep 2, 2:44 pm, Thibaut Barrère <[email protected]> wrote:
> > >> Hi guys,
>
> > >> now that I have some tagging functionality working with facets, it
> > >> looks like "model.facets" is quite slow (~ 3 seconds, see bench and
> > >> index definition below).
>
> > >> Is it faster on your apps, or is it expected ?
>
> > >> (I'm using the latest TS with Sphinx 0.9.8.1-release (r1533))
>
> > >> thanks for any hint,
>
> > >> -- Thibaut
>
> > >>>> bench { Item.facets }
>
> > >> [2009-09-02 14:41:17] DEBUG  Querying Sphinx:
> > >> [2009-09-02 14:41:17] DEBUG  Querying Sphinx:
> > >> [2009-09-02 14:41:20] DEBUG  Querying Sphinx:
> > >> 2.797898 seconds
> > >> => nil
>
> > >> my index definition is:
>
> > >>   define_index do
> > >>     indexes title
> > >>     indexes summary
> > >>     indexes source, :facet => true
> > >>     indexes tags.name, :as => :tag, :facet => true
> > >>     indexes pricing, :facet => true
> > >>     has update_date
> > >>   end
--~--~---------~--~----~------------~-------~--~----~
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