I have found it periodically difficult to specify visualization filters in the stringy form (especially with respect to negation cases, e.g. not vs NOT).
In the Discover view, I can see my filter expression in DSL syntax. Can filters be provided in this way to the Visualize designer? Here's a GIF of me trying and failing
Another thing to keep in mind, I believe the "type": "phrase" query was deprecated or removed, so you might have to change your query to something like this:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.