Category : full-text-search

Here’s my code: $terminosBuscados = ‘Vender la porteria’ $x = $conectarDB->prepare(" SELECT DISTINCT titulo, FROM_UNIXTIME(fecha, ‘%d-%m-%Y’) AS fecha, cuerpo, tipoContenido, autor FROM searchIndex WHERE match(titulo) AGAINST (‘ ? ‘ IN BOOLEAN MODE) ORDER BY contenidoID DESC "); $x->bindParam(1, $terminosBuscados); $x->execute(); $y = $x->fetchAll(PDO::FETCH_ASSOC); This is showing no results at all ($y returns null), when trying ..

Read more

So I have an objectRepository that contains the following code: public function searchObjects($data, $page = 0, $max = NULL, $em, $baseUrl, $locale) { try { $lastDate = new DateTime(‘last day of this month’); $lastDate = $lastDate->format(‘Y-m-d’) . ‘ 23:59:59’; $query = isset($data[‘query’]) && $data[‘query’] ? $data[‘query’] : null; null; $qb = $this->_em->getRepository(‘AuditConfigBundle:Objects’)->createQueryBuilder(‘o’); $qb->addSelect("o.id,o.objectCode,o.objectName,o.objectType,o.objectAdresse,o.objectTown") ->addSelect("o.objectPostalCode,o.objectNSEE,o.objectNbOutlet,o.objectETR,o.objectLOT") ->addSelect("o.objectGeom,o.objectGrouping1,o.objectGrouping2,o.objectStatus,o.objectTypeSupport") ..

Read more