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
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
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 = ...
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.
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
: 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
]
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
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