I found such query in some of the working repository:
SELECT id, full_name_tsvector <=> plainto_tsquery('English', 'test') AS rank
FROM names_tsvectors
WHERE "full_name_tsvector" @@ plainto_tsquery('English', 'test')
ORDER BY rank LIMIT 1000
The query gives result:
id |rank |
-----+---------+
6574|13.159472|
25653|13.159472|
5730|13.159472|
21924|13.159472|
6578|13.159472|
5813|13.159472|
22188| 16.44934|
21959| 16.44934|
20360| 16.44934|
So my question is – what does operator <=> do actually? I haven’t found anything about that operator except that it does not exist in Postgres.
>Solution :
PostgreSQL doesn’t contain an operator with that name. You probably got it from an extension.
Figure out which extension that is using the query
SELECT oprname AS operator_name,
oprnamespace::regnamespace AS operator_schema,
e.extname AS extension_name
FROM pg_operator AS o
JOIN pg_depend AS d
ON d.classid = 'pg_operator'::regclass
AND d.objid = o.oid
JOIN pg_extension AS e
ON d.refclassid = 'pg_extension'::regclass
AND d.refobjid = e.oid
WHERE d.deptype = 'e'
AND o.oprname = '<=>';
and look at the documentation of that software.