Hi Martin

Thanks for the patch - I'd probably shy away from pulling it into TS proper... 
however, if you wanted to write a patch that just returned the raw Riddle 
results (:raw => true), and then you have a helper method that pulls the 
attributes from that in your own code. This would keep it as something a bit 
more useful to more people.

Still, if others start requesting that they just want attributes, then maybe 
this is worth pulling in.

Thanks

-- 
Pat

On 16/12/2009, at 1:01 AM, Martin Sarsale wrote:

> Dear All, Pat:
> 
> For a specific query we had on our system, we could build the answer
> with just the Sphinx index attributes values which we found it's very
> fast compared with going to the db server to retrieve the real data.
> 
> So we patched TS and added a search's :attributes_only implemented in
> a similar way to search's :ids_only.
> 
> Pat: are you interested in this patch? it's just a few lines, (we
> hope) harmless and I think it adds an interesting capability to TS:
> 
>        if options[:ids_only]
>          replace @results[:matches].collect { |match|
>            match[:attributes]["sphinx_internal_id"]
>          }
>        elsif options[:attrs_only]
>          replace @results[:matches].collect { |match|
>            match[:attributes]
>          }
> 
> Thanks in advance!
> 
> -- 
> Martin Sarsale
> msn: [email protected]
> jabber: [email protected]
> twitter: http://twitter.com/runixo
> linkedin: http://www.linkedin.com/in/msarsale
> sumavisos: http://www.sumavisos.com
> blog: http://runa.tumblr.com
> 
> --
> 
> 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