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
$ dolt init
$ dolt sql -q "create table ft (id int primary key, doc text, fulltext idx(doc)) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci"
$ dolt sql -q "insert into ft values (1, 'This is text you bum'), (2, 'I hate dolts'), (3, 'Dolt is a sick database'), (4, 'Dolt dolt dolty dolt Dolt dolt')"
Query OK, 4 rows affected (0.01 sec)
$ dolt sql -q "select id, doc, match(doc) against('hate bum dolt') as relevance from ft order by relevance desc"
+----+--------------------------------+-----------+
| id | doc | relevance |
+----+--------------------------------+-----------+
| 1 | This is text you bum | 7.0377927 |
| 2 | I hate dolts | 4.3801537 |
| 3 | Dolt is a sick database | 4.2765365 |
| 4 | Dolt dolt dolty dolt Dolt dolt | 7.684004 |
+----+--------------------------------+-----------+
$ dolt sql -q "explain select id, doc, match(doc) against('hate bum dolt') as relevance from ft order by relevance desc"
+------------------------------------------------------------------------------------------------------------------+
| plan |
+------------------------------------------------------------------------------------------------------------------+
| Sort(MATCH (ft.doc) AGAINST ('hate bum dolt' IN NATURAL LANGUAGE MODE) as relevance DESC) |
| └─ Project |
| ├─ columns: [ft.id, ft.doc, MATCH (ft.doc) AGAINST ('hate bum dolt' IN NATURAL LANGUAGE MODE) as relevance] |
| └─ Table |
| └─ name: ft |
+------------------------------------------------------------------------------------------------------------------+
The text was updated successfully, but these errors were encountered:
$ dolt sql -q "select id, doc, match(doc) against('hate bum dolt') as relevance from ft where relevance > 7"
error on line 1 for query select id, doc, match(doc) against('hate bum dolt') as relevance from ft where relevance > 7: column "relevance" could not be found in any table in scope
Repro:
The text was updated successfully, but these errors were encountered: