Sphincter 1.0.0 Released

Sphincter version 1.0.0 has been released!

http://seattlerb.org/Sphincter

Sphincter uses Dmytro Shteflyuk's sphinx Ruby API and automatic configuration to make totally rad ActiveRecord searching. Well, you still have to tell Sphincter what models you want to search. It doesn't read your mind.

Features:

* Automatically configures itself. * Handy set of rake tasks for easy, automatic management. * Automatically adds has_many metadata for searching across the    association. * Stub for testing without connecting to searchd, Sphincter::SearchStub. * Easy pagination support. * Filtering by index metadata and ranges, including dates.

Problems:

* Setting match mode not supported. * Setting sort mode not supported. * Setting per-field weights not supported. * Setting id range not supported. * Setting group-by not supported.

See README.txt for quick-start, examples, etc.

Changes:

## 1.0.0 / 2007-07-26

* 1 major enhancement    * Birthday!

http://seattlerb.org/Sphincter

Hey Eric,

Looks pretty awesome. Can you tell me the main differences beteween this and say the acts_as_sphinx plugin? We'll be looking into implementing site search in the coming months and I'm fairly sure I want to use Sphinx (awesome stuff).

Hey Eric,

Looks pretty awesome. Can you tell me the main differences beteween this and say the acts_as_sphinx plugin? We'll be looking into implementing site search in the coming months and I'm fairly sure I want to use Sphinx (awesome stuff).

I set out to write something that would take away as much of my work as possible, and I left out anything I didn't need. Some people might want those things and I designed it to be easy for most people to add them (and tested it to make sure). I picked what I thought were sensible defaults for configuration options and automated it as much as possible.

acts_as_sphinx does much less than Sphincter, which means you have to do more.

With acts_as_sphinx: * You have to write the configuration file by hand. * You have to build the source queries by hand. * You don't get easy searches via associations like my_blog.posts.search for free. * You're hard-coded to /var/run, which probably won't work for VPS/slice setups. * You need a separate running sphinx daemon to test searching. * You don't have any test coverage (but acts_as_sphinx is tiny, with 164 lines of code.)

With acts_as_sphinx, you probably get some of these that Sphincter doesn't support:

Sphincter version 1.0.0 has been released!

Problems:

* Setting match mode not supported. * Setting sort mode not supported. * Setting per-field weights not supported. * Setting id range not supported. * Setting group-by not supported.

But I bet you don't need those anyhow, and if you did, they'll be easy to add.

I started with ultrasphinx, but I couldn't understand how to set it up to do what I wanted, I couldn't read the code, and it would've taken me longer to untangle it enough to make it do what I wanted than to build something from scratch.

With ultrasphinx: * You don't have full automatic configuration. There's some automatic configuration, but its in the sphinx.conf format rather than handy yaml, and its less automated. * You don't get tested code. (ultrasphinx is about 2x the LOC as Sphincter and has about 3x the magic.) * You don't get easy searches via associations like my_blog.posts.search for free. * You don't get daemon-free testing of searching. * You do get spelling support (but I can't see where it is tied in) * You do get excerpting * You do get scary warnings from searchd about missing indexes.

Do you have any comparison between this and acts_as_solr? That's
pretty simple to use as well.

Thanks

No, solr looks a lot bigger than Sphincter. It also requires the JRE which is a lot more files than just Sphinx.

Looking at its acts_as_solr method, Lucene has many more features in its search engine. You also get on-the-fly indexing, rather than having to use a cron job to update sphinx's index.

Rumor has it that reindexing using Sphinx takes less time than with Lucene, but I wouldn't know because I've never compared the too. It could be all lies.

I've seen sphinx index the same dataset in under 2 minutes that it took solr 20 minutes to index. Solr does have more features, but boy sphinx is fast and easy to work with.

Cheers- -- Ezra Zygmuntowicz-- Founder & Ruby Hacker -- ez@engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273)