I have a use-case where I’m trying to display the top 5 recently-added entities in a collection, sorted by their creation date (which I’m adding manually). These entities may change while still within that view, so I need a way to observe when only those limited results change.
I’ve seen the docs on limiting results, which suggests taking slicing in order to achieve limiting since results are lazy. However, it doesn’t look like this takes into account the scenario where you only want to subscribe to a limited subset of results. In lieu of there being an actual
limit() function, is there any way that I could subscribe to only a subset of the results collection?
I know that I can manually check the indices in
.update, but that seems clunky and I’d rather not do that if it can be avoided I also don’t think object-level notifications would help here as “recently added” could mean a new entity was added.
Any help here is appreciated!