Howto create an index for date range

I would need to be able to get documents based on them being “active”. A document is active if its online and “now” is between the start and stop date.


so ideally I want the above document to be listed in a view between the dates given so i know all items in the view are ok to show online e.g. in a listing web page.

But you cant use views like this as they are only computed upon document insert and update.

What is the best way of doing something like this?