Syntax issue with customized query

I am trying to create a Boolean query which takes in user input(stored in a variable) and appends it with an existing string for e.g.
User enters: "ABC" AND "CDE"
which will be stored in a temporary variable: var input= "ABC" AND "CDE"
and the query will look like:
"query": input + "AND GHE" ("ABC" AND" CDE" AND GHE)

If I search it on Kibana the query would look like this in the link:'"ABC"%20AND%"CDE"%20AND%GHE' .This is giving me a syntax issue since the whole query needs to be enclosed within one pair of quotation marks. Any idea how I can query like this? I am a beginner to elk so any pointers/tips will be helpful.