0
res = es.search(index="resume", body={"query": {"match" : {"resume_file_text" : '"+key+"'}}})

How pass the variable 'key' it holds the value given by user at UI and changes dynamically?

1 Answer 1

2

The body is a hash not a string (so no need to concat anything). So you can do it like this:

res = es.search(index="resume", body={"query": {"match" : {"resume_file_text" : key}}})
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you..It's Working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.