netgen / ezplatformsearch

eZ Platform Search is an eZ Publish legacy extension that integrates eZ Platform search capabilities into eZ Publish legacy
https://netgen.io
GNU General Public License v2.0
10 stars 5 forks source link

Add IndexOptions/NeedRemoveWithUpdate configuration option #14

Closed pspanja closed 6 years ago

pspanja commented 6 years ago

Search engine interface contains method needRemoveWithUpdate() to decide if the object needs to be removed before it's updated. By default it was returning true, causing documents to disappear from index in come cases (for example adding a Location), until the cronjob re-indexes it from the added entry in ezpending_actions table.

The behavior was initially copied from default implementation, but should not be really needed for integration with Solr search engine. This PR adds IndexOptions/NeedRemoveWithUpdate configuration option, by default configured to true in order to keep the existing behavior.

emodric commented 6 years ago

Thanks!