On 25/02/2010, at 12:07 PM, Richard wrote:

> While I have you there are a couple of rants I have about facets which
> I gave up using due to performance issues (un-needed db requests etc),
> if you could think about these it would be great.. (maybe I should
> move it to a separate thread)
> 
> 1. DB calls are made on associations even if you are only calling the
> id
> 
> exp I want maker_id facets on the product search (the makers table is
> called even though I only need the ids)

Yeah, you're not the first to request this, and I'd like to do it, just haven't 
had the time lately.

> 2. This is probably OK if you can access the extra objects that have
> been called, but I can't see a place to do this through the Face
> class, I monkey patched facet.rb to add this to facet results to be
> able to have this kind of functionality

Sorry, not following here - is this a continuation of the first point? If so, 
would love to see the patch :)

> 3. Rather than calling the facet then adding name_for wouldn't it be
> easier to have a facet flag on the main search method with the facets
> being accessible like results or current page is. This would keep
> functionality like scopes etc

That's a good idea... I guess I feel Search has become a pretty large and 
complex class already, though... but will keep it in mind next time I'm delving 
into that part of TS.

> 4. It would be nice for facets to give you decent count information
> for many to many associations

Can you give me examples where this isn't reliable?

I don't actually use facets myself, and rarely on client apps, so that code is 
something I don't go through too often.

Feedback is very much appreciated - now I just need to find the time for TS :)

-- 
Pat


> 
> Bar this it is an amazing plugin, thanks for the work
> 
> Richard
> 
> 
> 
> On Feb 24, 5:54 pm, Pat Allan <[email protected]> wrote:
>> Hi Richard
>> 
>> I guess this is a bug - I'd not thought of people wanting to clone a search 
>> object. Are you using TS as a plugin? If so, can you edit 
>> lib/thinking_sphinx/search.rb and add clone to the CoreMethods array near 
>> the top of the file, and see if that helps?
>> 
>> --
>> Pat
>> 
>> On 23/02/2010, at 8:22 PM, Richard wrote:
>> 
>> 
>> 
>>> Hi,
>> 
>>> I am wanting to use a separate thinking sphinx object to give me the
>>> list of makers available in a product search,
>> 
>>> If I start with the following (I want to dry this up rather that
>>> having to repeat the same list of criteria)
>> 
>>> @products = Product.order_by_price
>>> @makers = @products.clone
>>> RAILS_DEFAULT_LOGGER.debug "Products Type: #[email protected]}"
>>> RAILS_DEFAULT_LOGGER.debug "Makers Type: #[email protected]}"
>> 
>>> the output I get is
>> 
>>> Products Type: ThinkingSphinx::Search
>>> Makers Type: Array
>> 
>>> I want to call a scope on @makers to group the makers but as it is
>>> already become an array I am not able to.
>> 
>>> Does anyone know how to make a clone? Or have another way of doing
>>> this? Could this be a bug?
>> 
>>> Many thanks
>> 
>>> Richard
>> 
>>> --
>>> 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 
>>> athttp://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.
> 

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