PROBLEMA ORDER BY con FTS RANKING

From: emanuel medina <emanuel_me(at)yahoo(dot)es>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: PROBLEMA ORDER BY con FTS RANKING
Date: 2010-02-05 14:36:39
Message-ID: 716867.21179.qm@web26503.mail.ukl.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda


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

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Juan José (Pepe) 2010-02-05 17:18:55 Recomendaciones para optimizar servidor
Previous Message Mariano Reingart 2010-02-04 18:47:38 Re: renombre el directorio donde instale el postgres