lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Converting a Directory to a RAMDirectory
Date Thu, 17 Oct 2002 18:08:04 GMT
I like this, thanks for the contribution!

Developers:
 Shall we include this?
 Shall we include this as is in a new org.apache.lucene.util package?
 Shall we include this as is in the org.apache.lucene.store package?
 Shall we just add the convert method to FSDirectory class?

Thanks,
Otis


--- "Spencer, Dave" <dave@lumos.com> wrote:
> 
> A few months ago I suggested adding a utility 
> that converts a Directory to a RAMDirectory - useful if
> the index fits into RAM & are you're performing a series of expensive
> searches on the index. It seems to have no additional startup cost
> (surprising) and reduces execution time approx 20% (seems to be
> reasonable).
> I may have missed this or an equivalent utility being in the source
> base
> but looked
> at rc5 and didn't see it.
> 
> So I'm "reposting" this info & putting up a web page so this can
> be reused & found by, um, searchers.
> 
> The utility drops in easy to existing code.
> You replace a line like this:
>     searcher = new IndexSearcher( indexName);
> with
>     searcher = new IndexSearcher( Rammer.convert( indexName));
> 
> And that's it - approx reduction of 20% of runtime in some tests.
> For 2 experimental apps that do extensive term analysis (freq of
> pairs
> of terms)
> the time reductions are:
>     app 1: 45sec to 35sec
>     app 2: 22sec to 18sec
> 
> This is just by making a 1 line change.
> 
> 
> I've attached the file here and written it up a bit 
> on the web:
> 
> http://www.tropo.com/techno/java/lucene/rammer.html
> 
> I'm not an approved code contributor and ask that those who are
> consider
> adding this to the base - could be a ctr to RAMDirectory or a method
> in
> Directory of FSDirectory or a separate utility.
> 

> ATTACHMENT part 2 application/octet-stream name=Rammer.java
> --
> To unsubscribe, e-mail:  
> <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-dev-help@jakarta.apache.org>


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message