title: Nesting And Or in Mongodb Not working
body: <pre><code>$search_string="aaaa";
  $searchQuery = array(
  '$and' =&gt; array(
          'ispublished'=&gt;"1",
          '$or' =&gt; array(
          array(
              'title' =&gt; new MongoRegex("/^$search_string/i"),
              ),
              array(
                  'description' =&gt; new MongoRegex("/^$search_string/i"),
                  )
                                                  )
                                      )
                                          );
  </code></pre>
  
  <p>this is giving error saying bad query. I want the resullts that have ispublished 1 and (title having aaaa or description having aaaa)</p>