As the subject states.

I have a large index (~600mb) stored on the file system and am finding my
range query is rather slow.

I would like to pull the index into RAM and query against it to compare
speed.

Does simply doing the following accomplish this:



Directory ram = new RAMDirectory();

Directory dir = FSDirectory.GetDirectory(path, false);

ram = dir;

IndexSearcher searcher = new IndexSearcher(ram);

.



If so, I don't notice any difference in performance - my search still takes
a couple seconds to return .



Any thoughts?

Search Discussions

  • Sean Carpenter at Jan 20, 2009 at 8:32 pm
    You'll want to use one of the constructors to RAMDirectory that takes
    another Directory as a parameter. In your code, you're just moving around
    some object references - at the end the "ram" variable just points to the
    instance of FSDirectory.
    Sean
    On Tue, Jan 20, 2009 at 3:14 PM, David Cummings wrote:

    As the subject states.

    I have a large index (~600mb) stored on the file system and am finding my
    range query is rather slow.

    I would like to pull the index into RAM and query against it to compare
    speed.

    Does simply doing the following accomplish this:



    Directory ram = new RAMDirectory();

    Directory dir = FSDirectory.GetDirectory(path, false);

    ram = dir;

    IndexSearcher searcher = new IndexSearcher(ram);

    .



    If so, I don't notice any difference in performance - my search still takes
    a couple seconds to return .



    Any thoughts?


Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouplucene-net-user @
categorieslucene
postedJan 20, '09 at 8:20p
activeJan 20, '09 at 8:32p
posts2
users2
websitelucene.apache.org

2 users in discussion

David Cummings: 1 post Sean Carpenter: 1 post

People

Translate

site design / logo © 2022 Grokbase