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
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.
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?