Package com.tagtraum.beatunes.library
Class H2FullTextSearch
- java.lang.Object
-
- org.h2.fulltext.FullText
-
- com.tagtraum.beatunes.library.H2FullTextSearch
-
public class H2FullTextSearch extends org.h2.fulltext.FullText
H2-based full text search.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description H2FullTextSearch()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
isIndexHealthy(Connection connection)
Check the health of the index.long[]
search(Connection connection, String string, long playlistId)
long[]
search(Connection connection, String column, String string, long playlistId)
static void
setup(Connection connection)
static String
setupSQLScript()
static ResultSet
wildcardSearch(Connection conn, String text, int limit, int offset)
static ResultSet
wildcardSearchData(Connection conn, String text, int limit, int offset)
-
Methods inherited from class org.h2.fulltext.FullText
addWords, addWords, asString, closeAll, createIndex, createResultSet, createTrigger, dropAll, dropIndex, hasChanged, indexExistingRows, init, parseKey, quoteSQL, reindex, removeAllTriggers, search, search, searchData, setColumns, setIgnoreList, setWhitespaceChars, throwException
-
-
-
-
Method Detail
-
isIndexHealthy
public static boolean isIndexHealthy(Connection connection)
Check the health of the index.- Parameters:
connection
- connection- Returns:
true
, if the index is healthy
-
setup
public static void setup(Connection connection) throws SQLException
- Throws:
SQLException
-
setupSQLScript
public static String setupSQLScript()
-
search
public long[] search(Connection connection, String string, long playlistId) throws SQLException
- Throws:
SQLException
-
search
public long[] search(Connection connection, String column, String string, long playlistId) throws SQLException
- Throws:
SQLException
-
wildcardSearch
public static ResultSet wildcardSearch(Connection conn, String text, int limit, int offset) throws SQLException
- Throws:
SQLException
-
wildcardSearchData
public static ResultSet wildcardSearchData(Connection conn, String text, int limit, int offset) throws SQLException
- Throws:
SQLException
-
-