Use erlang views.
Add generic doc type filter.
Filter on doc_type.
Fix latest_value to use correct date.  

Back and forth with rfc1123_date was changing the date.