title: Can Mongoid `any_of` include use of external document relationships?
body: <p>I'm using MongoDB with Mongoid and trying to put in place a rudimentary search as a placeholder before we look at weighting, etc. The <code>any_of</code> method seems to be finding my embedded documents but not those linked by relations. Does anyone know if <code>any_of</code> can include relationships to other documents in the db, and if so what the syntax would be?</p>
  
  <pre><code>belongs_to :principal #owner
  belongs_to :account #owner
  
  scope :search, -&gt;(text) { any_of(
    {:description =&gt; /#{text}/i}, 
    {:name =&gt; /#{text}/i}, 
    {"entries.title" =&gt; /#{text}/i}, 
    {"entries.description" =&gt; /#{text}/i}, 
    {:tags =&gt; /#{text}/i}, 
    {"account.name" =&gt; /#{text}/i},  # Not finding by account name - because account isn't embedded?
    {"principal.name" =&gt; /#{text}/i} # Not finding by principal name - because not embedded?
  )}
  </code></pre>