I think you could use `MorePredicates.transformingPredicate(TermporalField.toValueFunction(), IS_PRIMARY_IMAGE)` here.