lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hanjo Riege <ha...@cataloom.com>
Subject Re: example of using RAMDirectory
Date Mon, 26 Jan 2004 17:01:09 GMT
Hi,

this works in my program:


        RAMDirectory ramDir = new RAMDirectory();
        IndexWriter ram_writer_de = new IndexWriter(ramDir,
                            new GermanAnalyzer(), true);
        // my method to fill the index
        fillIndex(ram_writer_de);
        ram_writer_de.optimize();
        IndexWriter fs_writer_de =  new IndexWriter(HOME_DIR + "de/",
                            new GermanAnalyzer(), true);
        fs_writer_de.addIndexes(new Directory[]{ramDir});

        fs_writer_de.close();
        ram_writer_de.close();


regards

Hanjo



Chong, Herb schrieb:
> this means creating two IndexWriter objects where one is using RAMDirectory and one using
FSDirectory? then i use addIndexes(Directory [])? i can't find a mergeIndexes().
> 
> Herb....
> 
> -----Original Message-----
> From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com]
> Sent: Monday, January 26, 2004 11:17 AM
> To: Lucene Users List
> Subject: Re: example of using RAMDirectory
> 
> 
> Use RAMDirectory and then user mergeIndexes(Directory[]) method.
> 
> Otis
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message