nqxcode / laravel-lucene-search

Laravel 4.2, 5.* package for full-text search over Eloquent models based on ZF2 Lucene.
73 stars 28 forks source link

Soft Reindex Database #37

Closed pvanhemmen closed 7 years ago

pvanhemmen commented 8 years ago

Hey there,

Rebuild of the database via console always triggers a search:clear before reindexing. Wouldn't it be possible to make that optional, since every update executed calls $this->delete($model) in Search.php anyway? This way it would be possible to soft rebuild the database instead of clearing it right away. Or does this have any negative side effects?

The reason I ask is that I'm not able to use the update / delete events provided by the SearchTrait, since all my data is directly written to the database by an import. Rebuilding the index from scratch every time takes a lot of time, during which the search is not available.

Thanx for an awesome laravel extension and your support!

nqxcode commented 8 years ago

If you are about "performing of operations without indexing" like this https://mattstauffer.co/blog/introducing-laravel-scout#perform-operations-without-indexing , I will add this functionality in the near future. And about "soft rebuilding". It should not have negative effects.

nqxcode commented 7 years ago

Added performing of operations without indexing for models with SearchTrait. Sorry for lay about "near future")