Is there a way to get from a Query instance all those terms that are effectively required for documents to contain? A QueryParser is used to create the Query instance, so the "content" of the query is user driven.
A user could for example give this as a query string
+A +B
then I would like to get [A, B] (e.g. as a string array)
or
A
then just [A] as the result I would need.
Something like this might work (untested):