I have created a database with a native fulltext index on a set of
columns in a table using:

CREATE ALIAS IF NOT EXISTS FT_INIT FOR
"org.h2.fulltext.FullText.init";
CALL FT_INIT();
CALL FT_CREATE_INDEX('PUBLIC', 'ARTICLES', 'AUTHOR,TITLE,TEXT');

I shut down the database, then re-opened it, then imported a bunch of
data.  Closed the database again. This was done with a mix of embedded
access and a running org.h2.Server instance.

I then opened the DB in DbVisualizer (embedded) and I can see the data
there; I can see the fulltext index there, with my words in it. Looks
good.

However, when I try to query it with:

select * from FT_SEARCH('water', 0, 0);

I get back an error:   Error Code: 90105, SQL State: 90105]  Exception
calling user-defined function; SQL statement:
select * from FT_SEARCH('*therapy*', 0, 0) [90105-119]

DbVis kindly gives a stack trace:

SQLState(90105) vendor code(90105)
org.h2.jdbc.JdbcSQLException
        at org.h2.message.Message.getSQLException(Message.java:105)
        at org.h2.message.Message.convert(Message.java:270)
        at org.h2.engine.FunctionAlias$JavaMethod.getValue(FunctionAlias.java:
306)
        at org.h2.expression.JavaFunction.getValue(JavaFunction.java:38)
        at org.h2.table.FunctionTable.getResult(FunctionTable.java:159)
        at org.h2.index.FunctionIndex.find(FunctionIndex.java:49)
        at org.h2.index.IndexCursor.find(IndexCursor.java:110)
        at org.h2.table.TableFilter.next(TableFilter.java:249)
        at org.h2.command.dml.Select.queryFlat(Select.java:490)
        at org.h2.command.dml.Select.queryWithoutCache(Select.java:557)
        at org.h2.command.dml.Query.query(Query.java:236)
        at org.h2.command.CommandContainer.query(CommandContainer.java:82)
        at org.h2.command.Command.executeQueryLocal(Command.java:142)
        at org.h2.command.Command.executeQuery(Command.java:123)
        at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.onseven.dbvis.Y.B.B.?(Z:2361)
        at com.onseven.dbvis.Y.B.B.invoke(Z:667)
        at $Proxy2.execute(Unknown Source)
        at com.onseven.dbvis.G.B.H.execute(Z:2165)
        at com.onseven.dbvis.G.B.K.execute(Z:2232)
        at com.onseven.dbvis.G.B.V.run(Z:2522)
        at com.onseven.dbvis.G.B.C.?(Z:3236)
        at com.onseven.dbvis.G.B.C.?(Z:499)
        at com.onseven.dbvis.G.B.C.execute(Z:2484)
        at com.onseven.dbvis.G.B.I.construct(Z:1013)
        at se.pureit.swing.util.SwingWorker$2.run(Z:1192)
        at java.lang.Thread.run(Thread.java:637)

Am I missing something? h2 1.1.118

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to