vicinityManager/server/controllers/search/get.js
/*
  Looks for a substring match whithin the userAccount collection
  Organisation is used as a index and it is the field we compare
  Text index are not used because do not support substring look up!
  */
Looks for a substring match whithin the userAccount collection
Organisation is used as a index and it is the field we compare
Text index are not used because do not support substring look up!
Looks for a substring match whithin the userAccount collection Organisation is used as a index and it is the field we compare Text index are not used because do not support substring look up!
function searchOrganisation(req, res, next) {
    var searchTerm = req.query.searchTerm;
    var sT = new RegExp(searchTerm, 'i');
    sGet.searchOrganisation(sT, function(err, response){
      res.json({error: err, message: response});
    });
  }
function searchOrganisation ( req , res , next ) { var searchTerm = req . query . searchTerm ; var sT = new RegExp ( searchTerm , 'i' ) ; sGet . searchOrganisation ( sT , function ( err , response ) { res . json ( { error : err , message : response } ) ; } ) ; }
Looks for a substring match whithin the userAccount collection
Organisation is used as a index and it is the field we compare
Text index are not used because do not support substring look up!
Looks for a substring match whithin the userAccount collection Organisation is used as a index and it is the field we compare Text index are not used because do not support substring look up!