Are you opening/closing your searcher and writer for each document? If so, it sounds like you're not closing all of them appropriately and that would be the cause of your memory increase. But you shouldn't have to do that anyway. Why not just use the same IndexReader to search and delete all your documents? I'm pretty sure that you can search/delete on the same reader without any problems....
If this is way off base, could you post some code snippets where you search/delete? That would help a lot. Best Erick On Sat, Oct 25, 2008 at 5:49 PM, Marc Sturlese <[EMAIL PROTECTED]>wrote: > > Hey there, > I am having some memory trouble with my Lucene app. I need to get the info > and delete about 1000 docs every time I execute the app. I get the IDs of > the documents to delete from a database and for all single ID I get the > data > from the indexed doc using an index searcher and topdocs (searching by the > ID I previously got). Once I get the info I close the index searcher and > delete the doc using indexwriter (indexwriter.deletedocuments(term)). I do > this fore every document I need to delete. The problem is than the app > starts increasing memory in use until 778Mb... and doing similar stuff like > adding documents from DB to index it stands in 150 as maximum. > I think the problem happen when i get the documents. I tryed to use the > same > indexsearcher to get all the docs but nothithng changed. I try also to put > topdocs to null and the query and queryparse I use to get the doc to null > aswell but nothing changes. > Has someone experienced this problem?. > I am using lucene 2.4 but with 2.3 was the same > Sorry for my english and thanks in advanced. > > -- > View this message in context: > http://www.nabble.com/Memory-problem-dealing-with-indexsearcher-and-topdocs-tp20168138p20168138.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >