We now use Sphinx to search our Rails project, with generally good
results.
Architecturally, we have one issue. All Ruby Sphinx projects (we use
acts_as_sphinx) seem to call the sphinx.rb. This calls searchd, as a
daemon.
But a Rails app running in Mongrel, for example, already is a daemon.
Whatever persistent benefit we get from keeping all those searchd
variables
loaded into memory, we could already get if they just loaded into our
own
memory.
(Our searches won’t go over like 3,000 documents here.)
So has anyone written an extension for Ruby that searches the same way
the
Sphinx “search” command does? It just calls into the index reading
system
directly, instead of pinging the searchd. You can search without searchd
loaded into memory, for example.
But a Rails app running in Mongrel, for example, already is a daemon.
Whatever persistent benefit we get from keeping all those searchd
variables
loaded into memory, we could already get if they just loaded into
our own
memory.
(Our searches won’t go over like 3,000 documents here.)
So has anyone written an extension for Ruby that searches the same
way the
Sphinx “search” command does? It just calls into the index reading
system
directly, instead of pinging the searchd. You can search without
searchd
loaded into memory, for example.
Wouldn’t that mean that with say 8 mongrels you’d have the index
loaded in memory 8 times ?
I don’t see why you couldn’t do it but I haven’t seen such an
extension before.
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.