lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Taylor <>
Subject Re: Unable to improve performance
Date Fri, 27 Mar 2009 16:06:42 GMT
Michael McCandless wrote:
> Are you opening your IndexReader with readOnly=true?  If not, you're
> likely hitting contention on the "isDeleted" method.
> When you run with a "normal" directory, either on a traditional hard
> drive or SSD device, do you use NIOFSDirectory?  That removes
> contention, but, it only works on non-Windows platform due to a
> long-standing bug in Sun's JRE.
It was a long lunch, actually Im just creating an IndexSearcher directly 
on a file

i.e Searcher searcher = new IndexSearcher(indexDir + "/track_index");

I was struggling to see how to create an NIOFSDirectory until I realised 
I needed Lucene 2.9, which Ive done as follows

Searcher searcher = new IndexSearcher( 
NIOFSDirectory(new File(indexDir + "/track_index"),null),true)));

Anyway the end result is query times have been reduced from 43 seconds 
to 23 seconds, so a pretty good result. (although I dont really 
understand why the RAMDirectory method didnt perform at least this well 
because it would have no file io contention)

thanks alot Paul

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message