# Ferret 0.3.0 (port of Apache Lucene to pure ruby)

**URL:** <https://www.ruby-forum.com/t/ferret-0-3-0-port-of-apache-lucene-to-pure-ruby/49326>\
**Category:** Ruby\
**Created:** [December 2, 2005, 4:40pm UTC](https://www.ruby-forum.com/t/ferret-0-3-0-port-of-apache-lucene-to-pure-ruby/49326 "2005-12-02T16:40:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbalmain.ml](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e47774/32.png) [@dbalmain.ml](https://www.ruby-forum.com/u/dbalmain.ml)\
**Post date:** [December 2, 2005, 4:40pm UTC](https://www.ruby-forum.com/t/ferret-0-3-0-port-of-apache-lucene-to-pure-ruby/49326/1 "2005-12-02T16:40:18Z")

</div>

Hi Folks,

I’ve just released version 0.3.0. Since my last announcement I’ve done  
a lot of work on improving the performance. With the C extension,  
Ferret is now only 2-4 times slower than Lucene. There have also been  
some performance improvements to the pure Ruby version too for those  
that aren’t able to compile the extension. There have also been some  
improvements to locking for those who have been having trouble. These  
changes are detailed below.

[http://ferret.davebalmain.com/trac/](http://ferret.davebalmain.com/trac/)

Dave Balmain

== Description

Ferret is a full port of the Java Lucene searching and indexing  
library. It’s available as a gem so try it out! To get started quickly  
read the quick start at the project homepage;

[http://ferret.davebalmain.com/api](http://ferret.davebalmain.com/api)  
[http://ferret.davebalmain.com/api/files/TUTORIAL.html](http://ferret.davebalmain.com/api/files/TUTORIAL.html)

== Changes

=== Locking

Now, if you cancel a process while it has a lock open, the  
lock should still be released. Also, you can set the index to auto  
flush;

```
index = Ferret::Index::Index.new(:auto_flush => true)

```

This will make sure no locks are kept open after updating the index.  
You won’t need to call flush anymore. This is very useful if you have  
multiple processes modifying the index as you might have in a Rails  
application.

If you still have lock problems, the best way to get rid of the locks  
is to use the unlock method of IndexReader. You’ll need to pass the  
directory where the locks are placed.

```
directory = Ferret::Store::FSDirectory.new("/path/to/index")
Ferret::Index::IndexReader.unlock(directory)

```

---

<div class="post-metadata">

**Author:** ![dbalmain.ml](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e47774/32.png) [@dbalmain.ml](https://www.ruby-forum.com/u/dbalmain.ml)\
**Post date:** [December 2, 2005, 5:20pm UTC](https://www.ruby-forum.com/t/ferret-0-3-0-port-of-apache-lucene-to-pure-ruby/49326/2 "2005-12-02T17:20:55Z")

</div>

David B. wrote:

> 

Looks nice – Have you tried running this with a web-bot to index  
websites?

---

<div class="post-metadata">

**Author:** ![dbalmain.ml](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e47774/32.png) [@dbalmain.ml](https://www.ruby-forum.com/u/dbalmain.ml)\
**Post date:** [December 3, 2005, 1:37am UTC](https://www.ruby-forum.com/t/ferret-0-3-0-port-of-apache-lucene-to-pure-ruby/49326/3 "2005-12-03T01:37:50Z")

</div>

On 12/3/05, Alan G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 
> 
> Looks nice – Have you tried running this with a web-bot to index websites?

Hi Alan,  
Not personally but someone may have. Lucene has certainly be used like  
this and Ferret would be well suited to the job. I’m certainly  
interested to hear how people are using Ferret so let me know if you  
do this.

Cheers,  
Dave
