title: Mongoose: boolean 'or' query with wildcard
body: <p>I' m trying to emuluate with Mongoose a fulltext search into two fields. I' ve spent most of the day testing several query types but I' ve always failed. The <strong>MongoDB shell query</strong> is this one:</p>
  
  <pre><code>db.feeds.item.find({lang:"en", $or:[{title: /searchexpression/}, {body: /searchexpression/}] })
  </code></pre>
  
  <p>In this example I want to return only english documents that matches the search expression (including a regex) in <strong>title</strong> or <strong>body</strong> fields or in both fields. This query works, but the problem starts, as I said, when trying to adapt it with <strong>Mongoose</strong>, :-(</p>
  
  <p>Some expressions that I used and that didn' t work:</p>
  
  <pre><code>exports.fullTextSearch = function(lang, text, callback) { 
      MyModel.find({lang:lang, $or: [{title:/text/},{body:/text/}]}).exec(callback);
      MyModel.find({lang:lang, $or: [{title: new RegExp('\/'+text+'\/')}, {body:new RegExp('\/'+text+'\/')}]}).exec(callback);
      MyModel.find({lang:lang}).or({title:/text/},{body:/text/}).exec(callback);
      MyModel.find({lang:lang}).or({title:new RegExp('\/'+text+'\/')},{body:new RegExp('\/'+text+'\/')}).exec(callback);    
  </code></pre>
  
  <p>}</p>
  
  <p>Thank you very much!</p>
  
  <p>Luis Cappa.</p>