studioespresso / craft-scout

Craft Scout provides a simple solution for adding full-text search to your entries. Scout will automatically keep your search indexes in sync with your entries.
MIT License
81 stars 54 forks source link

Elements not deleted when skipped by transformer #243

Closed marten-wirelab closed 11 months ago

marten-wirelab commented 2 years ago

I'm indexing a few different types of entries that may or may not contain certain fields. Currently, I have a few possible criteria whereby I don't want to index an entry, which is done by returning an empty array from the transformer.

The expected behaviour is that items are removed from the index when it changes so it falls within any of the criteria. However, it seems that skipping an entry from the transformer only stops Scout from updating it. It seems that to remove an item from the index, the only way (other than manually calling the deIndex method), is to make sure it doesn't fall within the criteria anymore, which is difficult in my case.

Is this as-designed?

janhenckens commented 11 months ago

Hey @marten-wirelab, not sure if you're still active and using Scout, but I finally got around to addressing this through #281.

Could you follow along there and there the latest beta release?