This filter has loads of duplicated code and my refactoring for adding multiple values is ugly to say the least. I think this could be vastly improved somehow .. perhaps removing 70% of this method if we could pass a value or some values to the query builder and join them with "and" or "or" automatically. Any suggestions?

Failing that, and perhaps it would be a useful feature in its own right, would be a factory method to retrieve new QB node instances.