title: How to apply update using Filtered positional operator with arrayFilters
body: <p>I am running on Mongodb 3.6, with mongo driver 3.4.3 and spring data mongo 1.5.10. Below is the structure of my document</p>
  
  <pre><code>{
    "_id": 12345,
    "_class": "com.example.ProductRates",
    "rates": [
      {
        "productId": NumberInt(1234),
        "rate": 100.0,
        "rateCardId": NumberInt(1),
        "month": NumberInt(201801)
      },
      {
        "productId": NumberInt(1234),
        "rate": 200.0,
        "rateCardId": NumberInt(1),
        "month": NumberInt(201802)
      },
      {
        "productId": NumberInt(1234),
        "rate": 400.0,
        "rateCardId": NumberInt(2),
        "month": NumberInt(201803)
      },
      {
        "productId": NumberInt(1235),
        "rate": 500.0,
        "rateCardId": NumberInt(1),
        "month": NumberInt(201801)
      },
      {
        "productId": NumberInt(1235),
        "rate": 234,
        "rateCardId": NumberInt(2),
        "month": NumberInt(201803)
      }
    ]
  }
  </code></pre>
  
  <p>am trying to do bulk update on the data as shown below </p>
  
  <pre><code>db.rates.update(
    { "_id" : 1234 },
    { $set: { "rates.$[item].rate": 200  } },
    { multi: true, 
     arrayFilters: [ { "item.rateCardId": {$in: [ 1, 2]} } ]
    }
  )
  </code></pre>
  
  <p>Now and trying to convert this code to java. Below is the code i was able to achieve for a bulk update case. As expected the below query is updating all the document due to the usage of $[]. Am trying to figure out how to apply array filters here using positional array update operators (like $[one] ). </p>
  
  <pre><code>WriteResult wr = getMongoTemplate().updateMulti(
              new Query(where("rates.rateCardId").is(1234)),
              new Update().set("rates.$[].rate", 200),
              ProductRates.class);
  </code></pre>
  
  <p>Also I could not find enough tutorials or documentation that suggests how to apply all the complex mongo queries in Java. please suggest if there are any good books or tutorial i can refer to.</p>