On Dec 13, 2005, at 11:28 AM, Abdur-Rahman A. wrote:
I am sorry, I just exited about ruby in general. But I thing with
language like ruby and a project like lucene, it?s my personal
opinion that LOC makes a difference. Things like mixins and the way
ruby you program in ruby makes things just a bit easier. I took me
4/5 days to understand and work with lucene (great book b.t.w.) and
it only took me a 10 days to learn most of edge rails and many
other plugins by reading code (yes not docs, code LOL)…
It’s not quite comparable the difference between a full-text search
engine and a web framework.
Lucene is optimized heavily - it’s code is more C-like than Java-
like. Making Lucene more OO or taking advantage of all the fancy
Ruby ways of method trickery is likely to slow things down. The
entire idea of a full-text search engine is to be fast! (oh, and to
be easy on resources as well)
Lucene is a great product, and will continue on java (you can’t
kill java, its really usable for many things). But ruby just makes
it easy to program, and with the integration with c. Well things
are optimized. I have only been rubying for a day or 20. But it
amazes my howmuch a language can make a difference…
The folks that would be coding under the covers of Ferret or Lucene
are a highly specialized group of folks. Likewise with the core code
of Rails. Most users don’t need to see what is underneath - it just
works.
Indeed the language makes a difference, but also the goal of the
effort. A full-text search engine has some very specialized needs
and even the most basic data structures in high level languages like
Hash and Array are only used if they are fast enough, otherwise
alternatives are created. This is definitely the case with Lucene.
So I have to revise my statement a bit, but I think, in time,
melting Ferret and ActiveRecord together could make it a better
product then lucene : ) But that future talk…
Well, in all fairness to Lucene, it is orthogonal to the database
concern entirely. Of course Ferret + ActiveRecord > just Lucene, but
to make the comparison more fair, how about Lucene + Hibernate?
There are hooks for Hibernate to index with Lucene, even using Java
annotations to mark the fields to be indexed, and how they are to be
indexed. I see ActiveRecord + Ferret to be a great path to go, and
the acts_as_ferret initial implementation is on the right track. I
hope to delve into this area more myself in the future (though my
work does not currently involve relational databases, but will soon).
Well, I am amazed to see you here : ) what is your opinion?
I’ve been a Ruby fan for ages, ever since catching a Dave T.
presentation in '02. I’ve dreamed of RubyLucene for years, creating
the rubylucene (formerly rucene) project at RubyForge once upon a
time but not doing much with it beyond some low-level I/O proof of
concept tests.
I’m ecstatic that Ferret exists! I do have some reservations on the
effort to port it all to C, as I’d really like the effort to aim
towards the architecture PyLucene has, where it uses GCJ against Java
Lucene, and then wraps it, using SWIG, into a Pythonic API. In order
to avoid porting every time Java Lucene changes (which is where the
guru creator Doug Cutting spends his effort), it would be a simple
recompilation (and perhaps some API glue).
Erik