Hi J
Presuming you’re using Thinking Sphinx v3, you’ve got two options:
* Perform a standard TS search, but use the ‘raw’ middleware set (which doesn’t
translate Sphinx results into ActiveRecord objects):
results = Model.search ‘foo’, :middleware =>
ThinkingSphinx::Middlewares::RAW_ONLY
* Or, construct the SphinxQL queries yourself by hand, and send them through to
the underlying connection (essentially, a wrapper around the mysql2 gem):
results = ThinkingSphinx::Connection.take do |connection|
connection.execute “SELECT * FROM foo_core"
end
Cheers
—
Pat
> On 21 May 2015, at 10:55 pm, J. Garcia <[email protected]> wrote:
>
> I am using Thinking Sphinx within my rails project and this is fine.
> However, I'd like to run an aggregated raw query against the configured
> sphinx search, which does not return any of the models.
>
> It seems I can do this via Riddle. However, how can I get a client from my
> current Thinking Sphinx setup?
>
> If that is possible, that is. I prefer to skip config details if I can.
>
> J.
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.