Reapply changes related to multi-xpath support and new fields in
compound_document.

Added support for multiple regex filtering.