Added support for external query in postings highlighter

It is now possible to highlight an external query using the postings highlighter, relates to #3630

Closes #4121