Stream-Framework icon indicating copy to clipboard operation
Stream-Framework copied to clipboard

Is it possible to filter a RedisAggregatedFeed based on read == True or seen == True

Open junaidurfjd opened this issue 10 years ago • 4 comments

Can I filter and aggregated feed like this..

feed.filter(read = True)

if not what can be an alternative..

The easiest way that comes to my mind is to get all activities and then return all those which have read == True

junaidurfjd avatar Jun 11 '15 20:06 junaidurfjd

The short answer to your question is - not, it is not possible to use such a filter. You can safely filter the activities in Python as you suggested in case you did not increase feed's max length (it is 100 by default).

Anislav avatar Jun 12 '15 08:06 Anislav

Great!!

junaidurfjd avatar Jun 12 '15 09:06 junaidurfjd

Is there any alternative for this? For example, if you pull 10 items from the stream and none match the filter, you have to keep going back to the feed until you have something. Is there no way to implement some kind of filtering at the storage level to pull data from cassandra streams but that only match on a field?

@tbarbugli @tschellenbach

Thanks for any thoughts or comments :)

UPDATE: I see now that you were asking about the redisAggregatedFeed, but curious if the CassandraAggregatedFeed would allow for filtering

jquacinella avatar Nov 02 '15 15:11 jquacinella

Any thoughts on the above @tbarbugli @tschellenbach @Anislav ?

jquacinella avatar Dec 07 '15 14:12 jquacinella