In https://www.h2database.com/html/tutorial.html#fulltext, the documentation writes to use the query:
SELECT T.* FROM FT_SEARCH_DATA('Hello', 0, 0) FT, TEST T WHERE FT.TABLE='TEST' AND T.ID=FT.KEYS[0];
This fails for the following reasons:
- TABLE is a reserved keyword, it needs to be quoted.
- FT.KEYS[0] doesn't exist - FT.KEYS[1] does. As far as I understood, array indexes start with 1
The correct query is therefore:
SELECT T.* FROM FT_SEARCH_DATA('Hello', 0, 0) FT, TEST T WHERE FT."TABLE"='TEST' AND T.ID=FT.KEYS[1];
Same issue in the next section, with the Lucene search (although I didn't test this one)