title: MongoDb - WildCard $search slow issue - realm query
body: <p>I have a MongoDB collection with almost 200.000 documents. Inside each document, I have a &quot;Localizations&quot; object containing the &quot;<strong>Keywords</strong>&quot; field. Contains data like &quot;<strong>Air Ducts, Glass Washing, Fuel Pipes, Blow Molding Plastic Parts, Plastic</strong>&quot;.
  I created an Index for this field to speed up the search queries. Then I added the below code to the query this way:</p>
  <pre><code>$search: {
        wildcard: {
          query: &quot;*&quot; + search + &quot;*&quot;,
          allowAnalyzedField: true,
          path: [&quot;Localizations.Keywords&quot;]
        },
      }
  </code></pre>
  <p>But the query is still slow. I tried the compound method and autocomplete indexing but still not fast enough.</p>
  <p>Note: results are limited to 20 rows.</p>