This is a limited implementation, so please backup your database before running this search feature branch from now on as we may change things. It's using a Unicode Snowball stemming tokenizer available from https://github.com/littlesavage/sqlite3-unicodesn, also handily available in src/sqlite3-unicodesn in Geary. If you want to look at the search tables on the command line, cd into the unicodesn source folder, run make and make install, then load sqlite3 like: sqlite3 -cmd '.load unicodesn.sqlext' /path/to/geary.db
35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
/*
|
|
** 2009 Nov 12
|
|
**
|
|
** The author disclaims copyright to this source code. In place of
|
|
** a legal notice, here is a blessing:
|
|
**
|
|
** May you do good and not evil.
|
|
** May you find forgiveness for yourself and forgive others.
|
|
** May you share freely, never taking more than you give.
|
|
**
|
|
******************************************************************************
|
|
**
|
|
*/
|
|
#ifndef _FTSINT_H
|
|
#define _FTSINT_H
|
|
|
|
#include "sqlite3.h"
|
|
#include "fts3_tokenizer.h"
|
|
|
|
typedef unsigned char u8; /* 1-byte (or larger) unsigned integer */
|
|
typedef short int i16; /* 2-byte (or larger) signed integer */
|
|
typedef unsigned int u32; /* 4-byte unsigned integer */
|
|
typedef sqlite3_uint64 u64; /* 8-byte unsigned integer */
|
|
typedef sqlite3_int64 i64; /* 8-byte signed integer */
|
|
|
|
#define UNUSED_PARAMETER(x) (void)(x)
|
|
|
|
/* fts3_unicode2.c (functions generated by parsing unicode text files) */
|
|
#ifdef SQLITE_ENABLE_FTS4_UNICODE61
|
|
int sqlite3FtsUnicodeFold(int, int);
|
|
int sqlite3FtsUnicodeIsalnum(int);
|
|
int sqlite3FtsUnicodeIsdiacritic(int);
|
|
#endif
|
|
|
|
#endif /* _FTSINT_H */
|