Removing and Add Indexes in Lucene Index

187 Views Asked by At

I have a Created Lucene Index over some documents and storing this index in a folder.

Now i want to update this Index like

1- Deleting subset of documents from Lucene Index

2- Adding more documents to Lucene Index

How is this possible ? Do i have to create Lucene Index over complete documents again?

Thanks

1

There are 1 best solutions below

2
On BEST ANSWER

Don't know which version of Lucene you are using, but assuming you are using Java and version 4.0+, you should open IndexWriter with APPEND mode, configured in IndexWriterConfig. If you are using .net, there should be a close counterpart.