|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.core.storage.sql.db.H2Fulltext
public class H2Fulltext
An optimized Lucene-based fulltext indexing trigger and search.
Nested Class Summary | |
---|---|
static class |
H2Fulltext.Trigger
Trigger used to update the lucene index upon row change. |
Method Summary | |
---|---|
static void |
createIndex(java.sql.Connection conn,
java.lang.String indexName,
java.lang.String schema,
java.lang.String table,
java.lang.String columns,
java.lang.String analyzer)
Creates a fulltext index for a table and column list. |
static void |
dropAll(java.sql.Connection conn)
Drops all fulltext indexes from the database. |
static void |
init(java.sql.Connection conn)
Initializes fulltext search functionality for this database. |
static void |
reindex(java.sql.Connection conn)
Re-creates the fulltext index for this database. |
static java.sql.ResultSet |
search(java.sql.Connection conn,
java.lang.String indexName,
java.lang.String text)
Searches from the given full text index. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void init(java.sql.Connection conn) throws java.sql.SQLException
CREATE ALIAS IF NOT EXISTS NXFT_INIT FOR "org.nuxeo.ecm.core.storage.sql.db.H2Fulltext.init"; CALL NXFT_INIT();
conn
-
java.sql.SQLException
public static void createIndex(java.sql.Connection conn, java.lang.String indexName, java.lang.String schema, java.lang.String table, java.lang.String columns, java.lang.String analyzer) throws java.sql.SQLException
A table may have any number of indexes at a time, but the index name must be unique. If the index already exists, nothing is done, otherwise the index is created and populated from existing data.
Usually called through:
CALL NXFT_CREATE_INDEX('indexname', 'myschema', 'mytable', ('col1', 'col2'), 'lucene.analyzer');
conn
- the connectionindexName
- the index nameschema
- the schema name of the tabletable
- the table namecolumns
- the column listanalyzer
- the Lucene fulltext analyzer class
java.sql.SQLException
public static void reindex(java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
public static void dropAll(java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
public static java.sql.ResultSet search(java.sql.Connection conn, java.lang.String indexName, java.lang.String text) throws java.sql.SQLException
Usually called through:
SELECT * FROM NXFT_SEARCH(name, 'text');
conn
- the connectionindexName
- the index nametext
- the search query
java.sql.SQLException
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |