title: How to use an alias instead of a FQN in the _class field in Elastic + SpringBoot (Spring Data)
body: <p>I'm using Spring Boot 2.5.8 (Spring Data) + Elastic(Search).
  While I'm storing data in ES, I've noticed a fully qualified name of the java class is being stored as _source._class.
  I was wondering if there is any way to change it for an <em>alias</em>.
  Here is an example:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;took&quot;: 12,
      &quot;timed_out&quot;: false,
      &quot;_shards&quot;: {
          &quot;total&quot;: 1,
          &quot;successful&quot;: 1,
          &quot;skipped&quot;: 0,
          &quot;failed&quot;: 0
      },
      &quot;hits&quot;: {
          &quot;total&quot;: {
              &quot;value&quot;: 23,
              &quot;relation&quot;: &quot;eq&quot;
          },
          &quot;max_score&quot;: 1.0,
          &quot;hits&quot;: [{
                  &quot;_index&quot;: &quot;ref&quot;,
                  &quot;_type&quot;: &quot;_doc&quot;,
                  &quot;_id&quot;: &quot;5518588&quot;,
                  &quot;_score&quot;: 1.0,
                  &quot;_source&quot;: {
                      &quot;_class&quot;: &quot;com.test.domain.Ref&quot;,
                      &quot;id&quot;: 5518588,
                      &quot;lang&quot;: &quot;el&quot;,
                      &quot;lastProcessed&quot;: 1644830564198
                  }
                  ]
              }
          }
      }
  }
  </code></pre>
  <p>Thanks in Advance...</p>