|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.fulltext.FullText
org.h2.fulltext.FullTextLucene
public class FullTextLucene
This class implements the full text search based on Apache Lucene. Most methods can be called using SQL statements as well.
Nested Class Summary | |
---|---|
static class |
FullTextLucene.FullTextTrigger
Trigger updates the index when a inserting, updating, or deleting a row. |
Constructor Summary | |
---|---|
FullTextLucene()
|
Method Summary | |
---|---|
static void |
createIndex(java.sql.Connection conn,
java.lang.String schema,
java.lang.String table,
java.lang.String columnList)
Create a new full text index for a table and column list. |
static void |
dropAll(java.sql.Connection conn)
Drops all full text indexes from the database. |
static void |
init(java.sql.Connection conn)
Initializes full text search functionality for this database. |
static void |
reindex(java.sql.Connection conn)
Re-creates the full text index for this database. |
static java.sql.ResultSet |
search(java.sql.Connection conn,
java.lang.String text,
int limit,
int offset)
Searches from the full text index for this database. |
static java.sql.ResultSet |
searchData(java.sql.Connection conn,
java.lang.String text,
int limit,
int offset)
Searches from the full text index for this database. |
Methods inherited from class org.h2.fulltext.FullText |
---|
asString, createResultSet, dropIndex, parseKey, quoteSQL, removeAllTriggers, setColumns, setIgnoreList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FullTextLucene()
Method Detail |
---|
public static void init(java.sql.Connection conn) throws java.sql.SQLException
CREATE ALIAS IF NOT EXISTS FTL_INIT FOR "org.h2.fulltext.FullTextLucene.init"; CALL FTL_INIT();
conn
- the connection
java.sql.SQLException
public static void createIndex(java.sql.Connection conn, java.lang.String schema, java.lang.String table, java.lang.String columnList) throws java.sql.SQLException
conn
- the connectionschema
- the schema name of the table (case sensitive)table
- the table name (case sensitive)columnList
- the column list (null for all columns)
java.sql.SQLException
public static void reindex(java.sql.Connection conn) throws java.sql.SQLException
conn
- the connection
java.sql.SQLException
public static void dropAll(java.sql.Connection conn) throws java.sql.SQLException
conn
- the connection
java.sql.SQLException
public static java.sql.ResultSet search(java.sql.Connection conn, java.lang.String text, int limit, int offset) throws java.sql.SQLException
conn
- the connectiontext
- the search querylimit
- the maximum number of rows or 0 for no limitoffset
- the offset or 0 for no offset
java.sql.SQLException
public static java.sql.ResultSet searchData(java.sql.Connection conn, java.lang.String text, int limit, int offset) throws java.sql.SQLException
conn
- the connectiontext
- the search querylimit
- the maximum number of rows or 0 for no limitoffset
- the offset or 0 for no offset
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |