I have created a small program that creates a single table:
CREATE TABLE DOCUMENTS(id INT PRIMARY KEY AUTO_INCREMENT, title
VARCHAR, filename VARCHAR, contents TEXT);
and the fulltext index:
CREATE ALIAS IF NOT EXISTS FT_INIT FOR \"org.h2.fulltext.FullText.init
\"; CALL FT_INIT();
CALL FT_CREATE_INDEX('PUBLIC', 'DOCUMENTS', NULL);
My problem is now - I am currently just testing with the title field -
that on the first attempts adding a few entries it works:
For example:
CALL FT_INIT();
INSERT INTO DOCUMENTS (title, filename, contents) VALUES ('test', '',
'');
CALL FT_INIT();
INSERT INTO DOCUMENTS (title, filename, contents) VALUES ('output',
'', '');
When I close the database connection and restart to add more entries,
those don't get indexed. I can't find them using
SELECT doc.* FROM FT_SEARCH_DATA('someother', 0, 0) FT LEFT JOIN
DOCUMENTS doc ON FT.TABLE='DOCUMENTS' AND doc.id=FT.KEYS[0]
What am I doing wrong or what is missing here?
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.