# Ruby/RoR - Lucene integration question?

**URL:** <https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/82974>\
**Category:** Rails\
**Created:** [November 19, 2005, 9:52am UTC](https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/82974 "2005-11-19T09:52:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![phukan\_ruban](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@phukan\_ruban](https://www.ruby-forum.com/u/phukan_ruban)\
**Post date:** [November 19, 2005, 9:52am UTC](https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/82974/1 "2005-11-19T09:52:44Z")

</div>

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/](http://thekode.net/ruby/rjni/) seems to indicate that it is no  
longer under development.

Thanks.

Ruban.

---

<div class="post-metadata">

**Author:** ![phukan\_ruban](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@phukan\_ruban](https://www.ruby-forum.com/u/phukan_ruban)\
**Post date:** [November 19, 2005, 10:01am UTC](https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/82974/2 "2005-11-19T10:01:47Z")

</div>

Hi, Ruban,

as just posted in another thread: Have a look at ferret  
([http://ferret.davebalmain.com](http://ferret.davebalmain.com)), which is a full ruby port of lucene.  
You’ll find performance comparisons on [http://blog.davebalmain.com](http://blog.davebalmain.com). Dave  
is doing a great job!!! Also the article  
[O'Reilly Media - Technology and Business Training](http://www.oreillynet.com/pub/wlg/8168) might interest you.

regards  
Jan P.

---

<div class="post-metadata">

**Author:** ![phukan\_ruban](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@phukan\_ruban](https://www.ruby-forum.com/u/phukan_ruban)\
**Post date:** [November 19, 2005, 10:25am UTC](https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/82974/3 "2005-11-19T10:25:55Z")

</div>

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

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 🙂

Warmest regards,  
Nathan.

* * *

Nathaniel S. H. Brown Toll Free 1.877.4.INIMIT  
Inimit Innovations Phone 604.724.6624  
[www.inimit.com](http://www.inimit.com) Fax 604.444.9942

---

<div class="post-metadata">

**Author:** ![phukan\_ruban](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@phukan\_ruban](https://www.ruby-forum.com/u/phukan_ruban)\
**Post date:** [November 19, 2005, 10:34am UTC](https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/82974/4 "2005-11-19T10:34:58Z")

</div>

Thanks Nathan and Jan for the info about Ferret. This definitely looks  
promising.  
But the problem is that the Lucene index is used by various other  
applications and is generated by a different application. I just read  
from it and so I can’t really move the index to Ferret.

But if I have to create one myself Ferret would definitely be in one of  
my preferences.

Ruban Phukan

---

<div class="post-metadata">

**Author:** ![phukan\_ruban](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@phukan\_ruban](https://www.ruby-forum.com/u/phukan_ruban)\
**Post date:** [November 19, 2005, 11:02am UTC](https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/82974/5 "2005-11-19T11:02:08Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

On Nov 19, 2005, at 1:33 AM, Ruban Phukan wrote:

> Thanks Nathan and Jan for the info about Ferret. This definitely  
> looks promising.  
> But the problem is that the Lucene index is used by various other  
> applications and is generated by a different application. I just  
> read from it and so I can’t really move the index to Ferret.
> 
> But if I have to create one myself Ferret would definitely be in  
> one of my preferences.

Ferret uses Lucene indexes.

You’re in business.

jeremy  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDfvgVAQHALep9HFYRAhrLAKDcSAfAlge6vDGfq/jNyLHTnT8pFACgzJVV  
/cPUCD3LE20VlfZXFDQz9nY=  
=gZRP  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![phukan\_ruban](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@phukan\_ruban](https://www.ruby-forum.com/u/phukan_ruban)\
**Post date:** [November 19, 2005, 2:57pm UTC](https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/82974/6 "2005-11-19T14:57:33Z")

</div>

Thanks everyone. These were all very useful info … sorry for  
overlooking the “full port” part of Ferret earlier.

Ferret rocks… eagerly waiting for the high speed C extensions.

Ruban Phukan

---

<div class="post-metadata">

**Author:** ![phukan\_ruban](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@phukan\_ruban](https://www.ruby-forum.com/u/phukan_ruban)\
**Post date:** [November 19, 2005, 8:41pm UTC](https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/82974/7 "2005-11-19T20:41:22Z")

</div>

Have the developers considered using RubyInline to optimize Ferret?  
That might be better than writing a C module.

---

<div class="post-metadata">

**Author:** ![phukan\_ruban](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/dec6dc/32.png) [@phukan\_ruban](https://www.ruby-forum.com/u/phukan_ruban)\
**Post date:** [November 19, 2005, 11:08am UTC](https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/82974/8 "2005-11-19T11:08:09Z")

</div>

Ferret can read indexes generated by Lucene. See “How to use Ferret on  
an Existing Java Lucene Index” on  
[http://ferret.davebalmain.com/trac/wiki/HowTos](http://ferret.davebalmain.com/trac/wiki/HowTos) . By “full port”, it  
means the whole enchilada is there, fully (?) compatible with Lucene.  
Actually, once the snazzy new C extensions are integrated, I’ll be  
faster than the original Lucene. Now isn’t that just peachy?

Jacob
