title: Spring data elasticSearch : Update entity using alias
body: <p>I'm currently fighting with the <code>spring-data-elasticsearch</code> API. I need it to work on an alias with several indexes pointing on it.<br>
  Each indexes have the same types stored, but are juste day to day storage (1rst index are monday's resulsts, second are tuesday's resulsts....).  </p>
  
  <p>Some of the <code>ElasticsearchRepository</code> methods don't work because of the alias. I currently managed to do a search (<code>findOne() equivalent</code>) but I am not able to update an entity.<br>
  I don't know how to achieve that, I looked to the documentation and samples.. but I'm stuck.</p>
  
  <p><strong>My repository</strong></p>
  
  <pre><code>public interface EsUserRepository extends ElasticsearchRepository&lt;User, String&gt;
  {
      @Query("{\"bool\" : {\"must\" : {\"term\" : {\"id_str\" : \"?0\"}}}}")
      User findByIdStr(String idStr);
  }
  </code></pre>
  
  <p><strong>My Entity</strong></p>
  
  <pre><code>@Document(indexName = "osintlab", type = "users")
  public class User
  {
      // Elasticsearch internal id
      @Id
      private String id;
  
      // Just a test to get the real object index (_index field), in order to save it
      @Field(index = FieldIndex.analyzed, type = FieldType.String)
      private String indexName;
  
      // Real id, saved under the "id_str" field
      @Field(type = FieldType.String)
      private String id_str;
  
      @Field(type = FieldType.String)
      private List&lt;String&gt; tag_user;
  
  }
  </code></pre>
  
  <p><strong>What I tested</strong></p>
  
  <pre><code>final IndexQuery indexQuery = new IndexQuery();
  indexQuery.setId(user.getId());
  indexQuery.setObject(user);
  
  esTemplate.index(indexQuery);
  
  userRepository.index(user));
  
  userRepository.save(user))
  </code></pre>