Forum: Ruby on Rails [ANN] Sphincter 1.0.0 Released

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2007-07-31 00:21
(Received via mailing list)
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

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars
153107d9ef8352ea7f787d2090d81666?d=identicon&s=25 Marston A. (Guest)
on 2007-07-31 07:35
(Received via mailing list)
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).
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2007-07-31 09:54
(Received via mailing list)
On Jul 30, 2007, at 22:34, Marston A. wrote:

>
> 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:

> On Jul 31, 12:20 am, Eric Hodel <drbr...@segment7.net> wrote:
>> 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.

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars
Ef0db53920b243d6758c2f6b1306df0d?d=identicon&s=25 Steve Ross (cwd)
on 2007-08-01 19:03
(Received via mailing list)
Do you have any comparison between this and acts_as_solr? That's
pretty simple to use as well.

Thanks
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2007-08-01 20:33
(Received via mailing list)
On Aug 1, 2007, at 10:02, s.ross wrote:

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

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.

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars
6076c22b65b36f5d75c30bdcfb2fda85?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2007-08-01 20:51
(Received via mailing list)
On Aug 1, 2007, at 11:32 AM, Eric Hodel wrote:

> 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)
This topic is locked and can not be replied to.