You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| tsvector <-> tsquery | float4 | Returns distance between tsvector and tsquery.
38
38
39
39
## Examples
40
40
@@ -67,15 +67,21 @@ CREATE INDEX rumidx ON test_rum USING rum (a rum_tsvector_ops);
67
67
And we can execute the following queries:
68
68
69
69
```sql
70
-
=# SELECT t, a >< to_tsquery('english', 'beautiful | place') AS rank FROM test_rum WHERE a @@ to_tsquery('english', 'beautiful | place') order by a >< to_tsquery('english', 'beautiful | place');
70
+
=# SELECT t, a <-> to_tsquery('english', 'beautiful | place') AS rank
71
+
FROM test_rum
72
+
WHERE a @@ to_tsquery('english', 'beautiful | place')
73
+
ORDER BY a <-> to_tsquery('english', 'beautiful | place');
71
74
t | rank
72
75
---------------------------------+-----------
73
76
The situation is most beautiful | 0.0303964
74
77
It is a beautiful | 0.0303964
75
78
It looks like a beautiful place | 0.0607927
76
79
(3 rows)
77
80
78
-
=# SELECT t, a >< to_tsquery('english', 'place | situation') AS rank FROM test_rum WHERE a @@ to_tsquery('english', 'place | situation') order by a >< to_tsquery('english', 'place | situation');
81
+
=# SELECT t, a <-> to_tsquery('english', 'place | situation') AS rank
82
+
FROM test_rum
83
+
WHERE a @@ to_tsquery('english', 'place | situation')
84
+
ORDER BY a <-> to_tsquery('english', 'place | situation');
0 commit comments