title: Serialization Error using Elasticsearch Python
body: <p>I'm trying to have my collection of indexed documents searchable using console input, I get a Serialization error and I don't understand why or how to fix it. I get that it's an error of the type of my variable, but I'm not sure if its giving the wrong type or wants a different type.</p>
  
  <pre><code>searchstr = input("Search for a character \n")
  
  body = {"query": {"prefix" : { "name": { searchstr } } } }
  
  print(es.search(index="sw", doc_type="people", body=body))
  </code></pre>
  
  <p>Here's the error; <code>elasticsearch.exceptions.SerializationError: ({'query': {'prefix': {'name': {'Lu'}}}}, TypeError("Unable to serialize {'Lu'} (type: &lt;class 'set'&gt;)",))</code></p>