Hi Steve

The reason I add this on when I get search results back, is because 
sphinx_attributes is useless at any other point, and I don't like the idea of 
modifying *all* objects for something that only has use in a single situation.

Still, maybe it's worth it - it would make the code cleaner, and probably speed 
up things when search results are populated. I would be interested in trying to 
figure out why memcache doesn't like it - don't suppose you've found out any of 
the finer details?

Cheers

-- 
Pat

On 28/01/2010, at 4:31 AM, Steve H wrote:

> So... we rely on memcache heavily throughout our site, as I'm sure
> many other developers do as well.
> 
> Adding the sphinx_attributes as a singleton method on the specific
> object that is pulled back from the search causes memcache to break.
> 
> Frankly, my preferred solution is for the thinking_sphinx gem to re-
> open ActiveRecord (or at least re-open the indexed classes) and add an
> attr_accessor :sphinx_attributes
> 
> Currently what we're doing is taking some of the stuff out of
> sphinx_attributes and putting it into a custom search_results object
> (legacy stuff), then looking our object up again by id.
> 
> I think the fix I'm going to do (for now) is to remove the
> sphinx_attributes method from the object once we're done initializing
> our custom search_results object.  But ideally, this wouldn't be
> necessary...
> 
> -Steve
> 
> -- 
> 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