[prev in list] [next in list] [prev in thread] [next in thread]
List: lucene-user
Subject: Re: Unable to improve performance
From: Paul Taylor <paul_t100 () fastmail ! fm>
Date: 2009-03-27 16:06:42
Message-ID: 49CCF992.4020702 () fastmail ! fm
[Download RAW message or body]
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(IndexReader.open(new
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic