title: Search any word in string mongodb with node js
body: <p>I want to create advanced search in project that is in Node JS with Mongo DB. I have created a field in DB that is search-key. user can type any word in text box and i want to match in this word in string and fetch the result. below my db structure and code. my code work only match first word of string not search in all string.   </p>
  
  <pre><code>DB : 
  {
  "_id": ObjectId("001"),
   "searchkey": "Test Product Test Product T-shirt Half sleeves Adidas"
  } 
  {
  "_id": ObjectId("123"), 
   "searchkey": "boy test Product Test Product T-shirt Half sleeves Nike"
  } 
  {
  "_id": ObjectId("456"), 
   "searchkey": "girl test Product Summer Product T-shirt full sleeves Adidas"
  } 
  {
  "_id": ObjectId("789"), 
   "searchkey": "any product any Product any Product T-shirt full sleeves Adidas"
  } 
  {
  "_id": ObjectId("1010"), 
   "searchkey": "woodland Product woodland Product T-shirt Half sleeves woodland"
  } 
  {
  "_id": ObjectId("1212"), 
   "searchkey": "Summer Product Test Product T-shirt Half sleeves Adidas"
  } 
  
  My Query : 
  
  Collection.find({searchkey : {$regex: new RegExp('^' + search.toLowerCase(), 'i')},searchkey : {$regex: new RegExp('^' + search.toUpperCase(), 'i')},is_active:true},function(error,fetchSearch){
  console.log(fetchSearch);
  });
  </code></pre>
  
  <p>If i search <code>test or TEST</code> it will give me only one result that id is 001 and rest of the result not match from all string. </p>
  
  <p>I want like if i search <code>summer</code> or <code>Summer</code> that it will give me <code>456 and 1212</code> _Id data.</p>