title: Is it possible to make realtime search in MongoDB via mongoose using angular controller with form search query input text?
body: <p>At first sorry for my english ..and for someone maybe stupid question but Im new at programming in Angular,Node, Express and mongoDB together...</p>
  
  <p>My question is If it is possible to make something like realtime search in DB . I am writing the query for search on the client side (angular + HTML) the matched result from mongoDB will show somewhere on the page (with number of similar word). I need to do it in the Angular and MongoDB using Node and Express for routing</p>
  
  <p>Example situation: In the browser I will write some word etc. cook and in my database are saved data like (cook, cooker, cooking) ...The result that I would like to show is whole row  of table with Cook and number of similar words with cook in the word so 3 is the answer ...</p>
  
  <p>I would like to know what I have to study,and use for it</p>
  
  <p>HTML would look like this I think ? ..:</p>
  
  <pre><code>&lt;form method="post" ng-submit="find()" name="findForm"&gt;
  
     &lt;div class="form-group"&gt;
         &lt;input class="form-control input-lg" type="text" name="word"
             ng-model="word" placeholder="search from Mongo" &gt;
     &lt;/div&gt;
  
     &lt;button type="submit" class="btn btn-lg btn-block btn-success"&gt;search
     &lt;/button&gt;
  </code></pre>
  
  <p>But I dont know whats next ...some controller with http post method or what ..? ..</p>
  
  <pre><code>angular.module('MyApp')
  .controller('SearchCtrl', ['$scope', '$http', function($scope, $http) {
      $http.post('/api/search', $scope.word)
      $scope.search= function() {
          ({
              -----??
          });
      };
  }]);
  </code></pre>
  
  <p>Is it right ? ...should it works ..? ..Last function should be in the server.js file where I have to implement function for find word in my DB..isn it ?</p>
  
  <pre><code>app.post('/api/search', function(req, res) {
     Word.find(........)
  // here I dont know how ..
  
  });
  </code></pre>
  
  <p>I will be very thankfull if somebody get me some advice how to pass through that ...thanks ..</p>
  
  <p>I m sorry if I dont explain my problem too clear ..if you have some more question what I am lookin for ..ask please ..</p>
  
  <p>THANKS..</p>