I have written two queries for searching, but I want to simplify them as it seems needed.def searching(term: String): List[String] = {    DB.withConnection { implicit c =>      var list = List[String]()      val pinfo = SQL(SELECT body FROM tableName WHERE body like {term} limit 0,14 ).on(term -> (% + term + %))()      pinfo.map {        row =>          list ::= row[String](body)      }      val res = SQL(SELECT body FROM tableName WHERE MATCH (body) AGAINST ({term} IN BOOLEAN MODE) limit 0,14 ).on(term -> term)()      res.map {        row =>          list ::= row[String](body)      }      return list.distinct    }  }
MySQL natural search and like search
mysql;mvc;scala;search