In Lucene 4.6.0 there was the method extractTerms that provided the extraction of terms from a query (Query 4.6.0). However, from Lucene 6.2.1, it does no longer exist (Query Lucene 6.2.1). Is there a valid alternative for it?
What I'd need is to parse terms (and corrispondent fields) of a Query built by QueryParser.
I have temporarely solved my problem with the following code. Smarter alternatives will be well accepted:
Maybe not the best answer but one way is to use the same analyzer and tokenize the query string: