I am testing some changes to the content repository implementation of
the Search service contracts.
To allow applications to specify if an item should be indexed or not,
I have added a field to cr_revisions called searchable_p. This field
is set to default to TRUE. By setting the default to TRUE,
applications that assume all content will be indexed will work exactly
the same as before.
If an application needs to disallow indexing on certain items, it can
set the searchable_p field to FALSE.
For example. In edit-this-page, we had decided that only
live_revisions would be indexed and searchable. So I am writing code
to update the searchable_p field when a live_revisions is added or
changed.
I could build this feature into the CR, but I think it is better if
each package that uses the CR can decide for itself how to implement
the indexing of items.
Packages that require search that do not use the content repository
would have to add this functionality in their own way.
I think that letting packages that are build on the CR modify the
searchable_p field if they need to is a better solution than assuming
in the CR triggers that only cr_revisions set as live_revision can be
indexed.
Comments or questions on this plan are welcome!