• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic Indexing Using Lucene  RSS feed

 
Zak Nixon
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Lucene.

Problem: I have a site that adds,deletes,updates, and searches on word documents. Once a user has added a new document, I append that document
to the existing index, if any, and if there is no index created, then I
build one. Now whenever the user wishes to delete a record, the index needs to be rebuilt, thus getting rid of the document that cooresponds to that record within Lucene. Unfourtunately, (I think) that means deleting the entire index and rewriting all of the stored records back to the index.

My question is : Is there any way in Lucene to define a single document to delete from the index, so that I do not have to rebuild it every time a deletion or update of a record occurs?

Thanks

Zak
 
Zak Nixon
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note: I have solved the problem. I can use the following code to delete a single record out of the index very easily.



Easy as pie. Good job Lucene Team!

Zak
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!