Get posts based multiple category ids

The cleanest solution is to add another custom database table. A pivot table for the many-to-many relationship between the posts and the document types. This new table would have the fields post_id and document_type_id.

Take a look at this post for how to do this with migxdb.