Ruby/RoR - Lucene integration question?


#1

Hi,

I’ve an application which is built with RoR and a search index in
Lucene. I need to be able to integrate Lucene into the RoR app. What is
the best way to do so ?

I know that rjni is a ruby-java bridge but is it stable ? Also the
update at http://thekode.net/ruby/rjni/ seems to indicate that it is no
longer under development.

Thanks.

Ruban.


#2

On Sat, Nov 19, 2005 at 05:49:20PM +0900, Ruban Phukan wrote:

I’ve an application which is built with RoR and a search index in
Lucene. I need to be able to integrate Lucene into the RoR app. What
is the best way to do so ?

I know that rjni is a ruby-java bridge but is it stable ? Also the
update at http://thekode.net/ruby/rjni/ seems to indicate that it is
no longer under development.

rjni is dead.
Try rjb:

http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge
http://raa.ruby-lang.org/project/rjb

You can find an excellent review of Ruby-Java bridges and related tools
at
http://jp.rubyist.net/magazine/?0003-RLR (Japanese).


#3

Just actually read a bit about Lucene after your post, and found that
there
is a new port called Ferret which you may find interesting.

Seems CDBaby went down this same path,
http://www.oreillynet.com/pub/wlg/8168.

Might be a more effective shift to move from Lucene to Ferrett then
build a
Ferrett gem to integrate into Rails. I am sure this would be well
received
open project in the Rails community :slight_smile:

http://ferret.davebalmain.com/trac

Warmest regards,
Nathan.


Nathaniel S. H. Brown Toll Free 1.877.4.INIMIT
Inimit Innovations Phone 604.724.6624
www.inimit.com Fax 604.444.9942


#4

iamkris wrote:

I am to embark on a similar project. Just started reading on it. Isn’t
the index file created by Lucene readable from Ruby?

As I have understood it, Ferret is a full port of Lucene, so you should
be able to use the same index file from Lucene and Ferret.


#5

I am to embark on a similar project. Just started reading on it. Isn’t
the index file created by Lucene readable from Ruby? I was planning to
index the files via Lucene and use Ruby to read the index file or if I
cannot read the index file from Ruby I plan to expose a webservice from
the Java side and consume it from the Ruby side. Looking at
Nathaniel’s post about CDBaby, I think I am on the right path.

I am looking at Ferret too but I think Lucene is more matured.


#6

On 11/20/05, Kris removed_email_address@domain.invalid wrote:

I am to embark on a similar project. Just started reading on it. Isn’t
the index file created by Lucene readable from Ruby?

Hi Kris,
Andreas is correct in stating that Ferret can read the index from Ruby.

I was planning to
index the files via Lucene and use Ruby to read the index file or if I
cannot read the index file from Ruby I plan to expose a webservice from
the Java side and consume it from the Ruby side. Looking at
Nathaniel’s post about CDBaby, I think I am on the right path.

Why use Lucene to index the files when you can use Ferret. If it’s
speed you are concerned about, it shouldn’t be a problem by the end of
the month. Ferret should be faster than Lucene by then. One good
reason I can think of is that you’ll have better support in Java for
indexing PDF’s and Microsoft Office Docs. And Unicode is easier in
Java.

I am looking at Ferret too but I think Lucene is more matured.

This is true in terms of possible bugs. But the index file format and
API are the same.

Anyway, I wish you the best, whatever choice you make.

Cheers,
Dave