# Sphinx search without searchd

**URL:** <https://www.ruby-forum.com/t/sphinx-search-without-searchd/130008>\
**Category:** Rails\
**Created:** [February 24, 2008, 4:22am UTC](https://www.ruby-forum.com/t/sphinx-search-without-searchd/130008 "2008-02-24T04:22:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [February 24, 2008, 4:22am UTC](https://www.ruby-forum.com/t/sphinx-search-without-searchd/130008/1 "2008-02-24T04:22:20Z")

</div>

Rubies:

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.

–  
Phlip

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [February 25, 2008, 11:59am UTC](https://www.ruby-forum.com/t/sphinx-search-without-searchd/130008/2 "2008-02-25T11:59:47Z")

</div>

On 24 Feb 2008, at 03:21, Phlip wrote:

> 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
