Janaki
Janaki

Reputation: 195

Zend Lucene Search - Update index - Is it possible?

I am implementing Zend Lucene search in my website. Now I am doing my index updation by deleting the old index by its id and re creating it. But I would like to know whether it is possible to update the index instead of deleting and recreating it. If possible please provide me steps.

Hope to get your queries soon.

Cheers..!!!

Upvotes: 0

Views: 609

Answers (1)

Ivan
Ivan

Reputation: 2262

from Zend framework documentation:

Once an index segment file is created, it can't be updated. New documents are added to new segments. Deleted documents are only marked as deleted in an optional .del file.

Document updating is performed as separate delete and add operations, even though it's done using an update() API call Zend_Search_Lucene API. This simplifies adding new documents, and allows updating concurrently with search operations.

Upvotes: 1

Related Questions