title: How to sort data ASC by total count of word in Mongodb in codeigniter PHP 7.3
body: <p>I'm looking for a query which returns all exact matches first followed by rows that contain one or more words of the search string ordered by word count.</p>
  
  <p>If a users searches for a the word "Banana" the query should return all rows that contain only "Banana", followed by "Banana" +1 word then "Banana" +2 words and so on.</p>
  
  <p>Example 1:</p>
  
  <p>Search "Banana":</p>
  
  <ol>
  <li>List item</li>
  <li>Banana</li>
  <li>Banana Split</li>
  <li>Banana Cakes</li>
  <li>Banana Cream Biscuits</li>
  <li>...</li>
  </ol>
  
  <p>Example 2:</p>
  
  <p>Search "Banana Cakes":</p>
  
  <ol>
  <li>List item</li>
  <li>Banana Cakes</li>
  <li>Banana</li>
  <li>Cakes</li>
  <li>Banana Split</li>
  <li>Chocolate Cakes</li>
  <li>Banana Cream Biscuits</li>
  <li>...</li>
  </ol>