Thank you both. > Date: Thu, 23 Jul 2009 11:55:58 -0400 > Subject: Re: Loading an index into memory > From: erickerick...@gmail.com > To: java-user@lucene.apache.org > > What are you trying to accomplish? I'd insure that my performance wasa > problem before doing anything. If you're thinking "it's in RAM so it > has to be faster" you might be surprised..... > > So gather evidence that you have a problem before you jump to > providing a solution. > > Erick > > On Thu, Jul 23, 2009 at 9:47 AM, Uwe Schindler <uschind...@pangaea.de>wrote: > > > The size is in bytes and the RAMDirectory stores the bytes in bytes, so > > size > > is equal. I would suggest to not copy the dir into a RAMdirectory. It is > > better to use MMapDirectory in this case, as it "swaps" the files into > > address space like a normal OS swap file. The OS kernel will automatically > > swap needed parts into physical RAM. In this case the Java Heap is not > > wasted and only needed parts are swapped into RAM. > > > > ----- > > UWE SCHINDLER > > Webserver/Middleware Development > > PANGAEA - Publishing Network for Geoscientific and Environmental Data > > MARUM - University of Bremen > > Room 2500, Leobener Str., D-28359 Bremen > > Tel.: +49 421 218 65595 > > Fax: +49 421 218 65505 > > http://www.pangaea.de/ > > E-mail: uschind...@pangaea.de > > > > > -----Original Message----- > > > From: Dragon Fly [mailto:dragon-fly...@hotmail.com] > > > Sent: Thursday, July 23, 2009 3:38 PM > > > To: java-user@lucene.apache.org > > > Subject: Loading an index into memory > > > > > > > > > Hi, > > > > > > I have a question regarding RAMDirectory. I have a 5 GB index on disk > > and > > > it is opened like the following: > > > > > > searcher = new IndexSearcher (new RAMDirectory (indexDirectory)); > > > > > > Approximately how much memory is needed to load the index? 5GB of memory > > > or 10GB because of Unicode? Does the entire index get loaded into memory > > > or only parts of it? Thank you. > > > > > > > > > _________________________________________________________________ > > > Windows LiveT HotmailR: Celebrate the moment with your favorite sports > > > pics. Check it out. > > > > > http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM > > > _WL_QA_HM_sports_photos_072009&cat=sports > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > > >
_________________________________________________________________ Bing™ brings you maps, menus, and reviews organized in one place. Try it now. http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TXT_MLOGEN_Local_Local_Restaurants_1x1