title: How to write following elastic-search wildcard query in spring boot?
body: <p>Database: Elasticsearch</p>
  
  <p>Field Name: "tag"</p>
  
  <p>Datatype: String</p>
  
  <p>Question: How to perform a search in the <code>tag</code> field with a wildcard character?</p>
  
  <p>I tried the following (in Kibana):</p>
  
  <p>User Request: <code>{ "tag" : [ "Attendance", "Employee" ] }</code></p>
  
  <pre><code>POST test/_search
  {
      "query":{
          "bool" : {
            "should" : [
              {"wildcard":{"tag.keyword": "*Attendance*" }},
              {"wildcard":{"tag.keyword": "*Employee*" }}
            ]
          }
      }
  }
  </code></pre>
  
  <p>This worked successfully but I don't have an idea how to perform the same thing in spring boot.</p>
  
  <p>I worked with following:</p>
  
  <pre><code>.should(wildcardQuery("tag.keyword", "Attendance"))
  </code></pre>
  
  <p>But this is just for a single field,
  I have a requirement for a dynamic field where user input should be different in size and value.</p>
  
  <p>Can someone please guide me?</p>