On 03/09/2009, at 10:24 AM, Thibaut Barrère wrote:
> 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 ?
Nope, syntax *should* work. Are you using the latest TS changes? There
was a fix for string facets late August, but given that it works as a
field, then it's probably a bug. Feel free to add an issue to GitHub
so I don't forget to fix it :)
--
Pat
> 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
-~----------~----~----~----~------~----~------~--~---