SELECT distinct nsf_linhas.id, nsf_linhas.id id_linha, (MATCH (nsf_linhas.identificacao) AGAINST ('**' in boolean mode) * 3) + (MATCH (nsf_itinerarios.comentarios) AGAINST ('**' in boolean mode) * 2 ) + (MATCH (nsf_pontos_onibus.descricao) AGAINST ('**' in boolean mode) * 1 ) AS rank FROM nsf_itinerarios INNER JOIN nsf_linhas ON nsf_linhas.id = nsf_itinerarios.nsf_linhas_id INNER JOIN nsf_pontos_itinerario ON nsf_itinerarios.id = nsf_pontos_itinerario.nsf_itinerarios_id INNER JOIN nsf_pontos_onibus ON nsf_pontos_itinerario.nsf_pontos_id = nsf_pontos_onibus.id WHERE MATCH (nsf_linhas.identificacao) AGAINST ('**' in boolean mode) OR MATCH (nsf_itinerarios.comentarios) AGAINST ('**' in boolean mode) OR MATCH (nsf_pontos_onibus.descricao) AGAINST ('**' in boolean mode) ORDER BY rank DESC [nativecode=1064 ** syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*']SELECT::nsf_itinerarios