I recently bumped into a possible issue, can't really determin if this is by design or a bug so I thought I'd raise the question here.
I've written an indexing convention that is based on a boolean property on a specific page like this:
.ShouldIndex(x => !x.ExcludeFromSearch);
When adding a page with this property set to true it does not get indexed - everything is peachy.
However, when saving a page that previously had this property set to false the item in the index does not get removed nor updated with the new value.
Should indexing conventions not remove the item from the index if a property is updated that makes the item invalid?
Surely one would not have to empty the index and perform a complete reindexing for this to work?
So obviously this was by design and the following workaround has to be put in place:
var shouldIndex = !x.ExcludeFromSearch;