Re: possible to read index into memory?

2008-08-13 Thread Darren Govoni
Hoss, Thank you for the detailed response. What I found weird was it seemed to take 0.09 seconds to create a RAMDirectory off a 17MB index. Suspiciously fast, but ok. Yet, when I do a simple fuzzy search on a single field word: someword~0.76 It was taking .35 seconds. That's a very very

Re: possible to read index into memory?

2008-08-13 Thread Erick Erickson
How are you measuring? There is a bunch of setup work for the first few queries that go through the system. In either case (RAM or FS), you should fire a few representative warmup queries at the search engine before you go ahead and measure the response time. You also *must* isolate your search

Re: possible to read index into memory?

2008-08-13 Thread Darren Govoni
Erick, Thank you for the valuable tips. The time I'm measuring is just around the lucene search calls with standard analyzer, such as: word = helloo starttime = ... query = QueryParser(word, analyzer).parse(word+~0.76) hits = searcher.search(query) endtime = ...

Re: possible to read index into memory?

2008-08-12 Thread Darren Govoni
Hello, The kind sir below recommended the RAMDirectory for loading an on-disk index into memory (the entire data) and using IndexSearcher off that. It seemed to worked very well. On one index, I am seeing no speed change when flipping between RAMDirectory IndexSearcher and file system version.

Re: possible to read index into memory?

2008-08-12 Thread Kalani Ruwanpathirana
Did you try this? byte [] buffer = new byte [100] ; LuceneUtils.copy(fsDir, ramDir, buffer); Kalani On Wed, Aug 13, 2008 at 6:26 AM, Darren Govoni [EMAIL PROTECTED] wrote: Hello, The kind sir below recommended the RAMDirectory for loading an on-disk index into memory (the entire data) and

Re: possible to read index into memory?

2008-08-12 Thread Chris Hostetter
: On one index, I am seeing no speed change when flipping between : RAMDirectory IndexSearcher and file system version. that is probably because even if you just use an FSDirectory, your OS will cache the disk pages in RAM for you -- all using a RAMDirectory does for you is garuntee that the

Re: possible to read index into memory?

2008-08-12 Thread Otis Gospodnetic
] To: java-user@lucene.apache.org Sent: Tuesday, August 12, 2008 10:55:28 PM Subject: Re: possible to read index into memory? : On one index, I am seeing no speed change when flipping between : RAMDirectory IndexSearcher and file system version. that is probably because even if you just use

Re: possible to read index into memory?

2008-06-26 Thread Erick Erickson
From the docs... RAMDirectory public *RAMDirectory*(Directory file:///C:/lucene-2.1.0/docs/api/org/apache/lucene/store/Directory.html dir) throws IOException http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html Creates a new RAMDirectory instance from a different