First, you should rather use the query DSL, where the query is stated in the body of a HTTP request, as this prevents confusion or any requirement to URL encode parts of your query.
Second, can you please provide a fully reproducible example? I have no idea, what a query is, what a stored documents looks like, how your mapping or index configuration looks like. Those are all needed.
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.