Currently directories can be queried through a map of key/values with the implicit semantics of filtering on key1 = value1 AND key2 = value2 AND ....
However there is a need for more expressive filter clauses, the first being to do OR clauses, with or without the same keys. More generally, let's go to a fully general clause based on a org.nuxeo.ecm.core.query.sql.model.Predicate.
The ordering features (ORDER BY) and paging features (LIMIT / OFFSET) must still be supported with this.