added pessimistic (scan and check only passed keys) document filtering in addition to optimistic (scan all except ignored);