title: Mongo query search a string inside a map
body: <p>I have managed to search a string type name inside the dto by using the following query,</p>
  <pre><code>@RestResource(path = &quot;searchByName&quot;)
  @Query(&quot;{'$and': [{'companyId': ?0}, {name : {$regex : ?1, $options: 'i'}}]}&quot;)
  Page&lt;Shop&gt; findByName(String companyId, String name, Pageable pageable);
  </code></pre>
  <p>But now the name in the dto has changed to names which is a map,</p>
  <p>old DTO,</p>
  <pre><code>class Shop {
      private String id;
      private String companyId
      private String name;
  }
  </code></pre>
  <p>new DTO,</p>
  <pre><code>class Shop {
      private String id;
      private String companyId
      private Map&lt;String, String&gt; names;
  }
  </code></pre>
  <p>Now the shop name has changed to names that contains names in different languages in a map.
  ex:</p>
  <pre><code>{
      &quot;EN&quot;: &quot;Shop1&quot;,
      &quot;SW&quot;: &quot;affär&quot;
  }
  </code></pre>
  <p>So if client gives a text like 'sho' it should search inside the map values and should return the whole dto. How can I change the query to achive that?</p>