SELECT idxw, (ts_rank_cd(to_tsvector('spanish', textow), q)) AS rank
      FROM word, to_tsquery('amenazar & estructurar') q
      WHERE to_tsvector('spanish', textow) @@ q
      ORDER BY rank DESC
---------------------------------------------------
2680;0.75423
2678;0.754186
2996;0.100139
3006;0.100137
3020;0.100137
3001;0.100137
2999;0.100137
3003;0.100137
3013;0.100137
3016;0.100137
3018;0.100137
2712;0.1
2705;0.1
2704;0.1
2974;0.0047619
2991;0.0047619
3008;0.00230178
3011;0.000107955
2995;0.000106258  ->>>>>>>>>>>
2980;9.49668e-005 ->>>>>>>>>>LO TOMA COMO TEXTO
2992;9.46074e-005
2728;8.8574e-005
3009;5.70451e-005
-----------------------------------------------
Y SI SE USA LIMIT 
SELECT idxw, (ts_rank_cd(to_tsvector('spanish', textow), q)) AS rank
      FROM word, to_tsquery('amenazar & estructurar') q
      WHERE to_tsvector('spanish', textow) @@ q
      ORDER BY rank DESC
      LIMIT 1
----------------------------------------
2680;0.75423
Lo cual es falso.


_________________________
Emanuel Medina Gómez


      
____________________________________________________________________________________
¡Obtén la mejor experiencia en la web!
Descarga gratis el nuevo Internet Explorer 8. 
http://downloads.yahoo.com/ieak8/?l=e1

Responder a