vulcandigital/silverstripe-search

Index build for models that have already existed prior to adding the extension

zanderwar opened this issue · 2 comments

As per title, say if you already have a DataObject with 100 records already existing. If you were to then add SearchIndexExtension those existing records would not get indexed until those records ->write() again.

A work around for this is running the BuildIndex task.

If we were to automate this, the extension would require it's first DB Boolean field. We could then implement Flushable and then check if that field is true, if it isn't then index all existing records and then toggle that field to true

I'm closing this in favor of the BuildTask mentioned above