Issue #1848720 by cpliakas: Added API function for parsing terms and phrases from a passed search query, improved on the comments.