Refreshing indexed pages
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Terence_Parr
Posted On:   Thursday, January 31, 2002 12:23 PM

I'm getting the idea that there are problems when you do a bunch of add / delete operations on an index using the same two IndexWriter / IndexReader objects. I have a list of links whose page contents have changed. I wanted to delete the links from the db and add them again so they get "refreshed". For efficiency, I open one reader and one writer. Searches find the old links and deletes proceed without error and adds work too except that I get two not 1 after I close the db. I even tried using writer.optimize() after I do a delete. Surely, the concept of refreshing links is addressed. Can anybody point me in the proper direction. The FAQ here and at jakarta haven't really answered it an any detail. They   More>>

I'm getting the idea that there are problems when you do a bunch of add / delete operations on an index using the same two IndexWriter / IndexReader objects.



I have a list of links whose page contents have changed. I wanted to delete the links from the db and add them again so they get "refreshed". For efficiency, I open one reader and one writer. Searches find the old links and deletes proceed without error and adds work too except that I get two not 1 after I close the db. I even tried using writer.optimize() after I do a delete.



Surely, the concept of refreshing links is addressed. Can anybody point me in the proper direction. The FAQ here and at jakarta haven't really answered it an any detail. They say that you just delete and add but that doesn't seem to work.

   <<Less

Re: Refreshing indexed pages

Posted By:   gerd_reinhardt  
Posted On:   Sunday, April 21, 2002 06:33 AM

funny thing. After I told, that I experience the same problems, I tried to solve the problem and succeeded:
Don't have a writer opened if you want to delete with a reader !
First open the reader and delete.
Then open the writer and compact.
Thats it.

Re: Refreshing indexed pages

Posted By:   Otis_Gospodnetic  
Posted On:   Sunday, March 10, 2002 07:40 PM

Terence,


I was wondering if you ever found the source of this problem. If it sounds like it could be a problem for others I'd like to add it to the Lucene FAQ.


Thanks,


Otis
About | Sitemap | Contact