Every-time I create or update a model in my Rails app, the following output occurs from Sphinx:
Sphinx 0.9.8.1-release (r1533)
Copyright (c) 2001-2008, Andrew
Aksyonoffusing config file
‘/Users/jason/development/projects/active/project/config/development.sphinx.conf’…
indexing index ‘ad_delta’… collected
17 docs, 0.0 MB collected 0 attr
values sorted 0.0 Mvalues, 100.0% done
sorted 0.0 Mhits, 100.0% done total 17
docs, 944 bytes total 3.827 sec,
246.69 bytes/sec, 4.44 docs/sec rotating indices: succesfully sent
SIGHUP to searchd (pid=10655).
which is causing a big performance hit.
Is there any way to prevent this from happening with sphinx (thinking_sphinx)?
This only happens if you have delta indexing enabled. If you don’t need Sphinx completely up-to-date, then just turn deltas off in your
define_indexblock.If you do want your updates being reflected in your search results, then you either have to live with this, or switch to delayed deltas, which means using Delayed Job to process the delta indexes. This removes the performance hit from every web request, and lets Delayed Job do the processing for you.
It’s all covered pretty well in the documentation, but feel free to post to the google group if you get stuck or something doesn’t make sense.