Get words used in Query String


Is there a way (possibly leveraging the built-in query parser) to easily get the original words that were used in a Query String Query? For example, if I send the following query string as a query:

boston AND ("red sox" OR celtics)

I would like to return a list of ["boston", "red sox", "celtics"] or something similar. Is there an easy way to do this?