There was a fairly recent change (v3.0.3) that added a 'ShowInSearch' field to the SearchServiceExtension. The change also had a $defaults definition to default the value to true, however this only works for new records not existing ones.
Consequently for anyone upgrading existing projects, any DataObject (excluding SiteTree based ones) that uses this extension would have the 'ShowInSearch' column added and any existing records would use the database default of 0 which causes them all to become unindexed upon a full reindex.
How to reproduce
Have a project using 3.0.2 of this module or earlier and a dataobject with the SearchServiceExtension applied.
Create one or many of those dataobjects
Upgrade the module to 3.0.3
Run dev/build
Those dataobjects now have 'ShowInSearch' set to 0
Run a full reindex, data object are removed from the index
Possible Solution
I've provided a fix in #98
Additional Context
No response
Validations
[X] Check that there isn't already an issue that reports the same bug
[X] Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
Module version(s) affected
3.0.3
Description
There was a fairly recent change (v3.0.3) that added a 'ShowInSearch' field to the SearchServiceExtension. The change also had a
$defaults
definition to default the value to true, however this only works for new records not existing ones.Consequently for anyone upgrading existing projects, any DataObject (excluding SiteTree based ones) that uses this extension would have the 'ShowInSearch' column added and any existing records would use the database default of
0
which causes them all to become unindexed upon a full reindex.How to reproduce
Possible Solution
I've provided a fix in #98
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)