Basic search table implementation; fix #6766
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
This commit is contained in:
parent
f5ba36ce2c
commit
a4f680b4ff
103 changed files with 30586 additions and 43 deletions
26
src/sqlite3-unicodesn/libstemmer_c/runtime/api.h
Normal file
26
src/sqlite3-unicodesn/libstemmer_c/runtime/api.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
typedef unsigned char symbol;
|
||||
|
||||
/* Or replace 'char' above with 'short' for 16 bit characters.
|
||||
|
||||
More precisely, replace 'char' with whatever type guarantees the
|
||||
character width you need. Note however that sizeof(symbol) should divide
|
||||
HEAD, defined in header.h as 2*sizeof(int), without remainder, otherwise
|
||||
there is an alignment problem. In the unlikely event of a problem here,
|
||||
consult Martin Porter.
|
||||
|
||||
*/
|
||||
|
||||
struct SN_env {
|
||||
symbol * p;
|
||||
int c; int l; int lb; int bra; int ket;
|
||||
symbol * * S;
|
||||
int * I;
|
||||
unsigned char * B;
|
||||
};
|
||||
|
||||
extern struct SN_env * SN_create_env(int S_size, int I_size, int B_size);
|
||||
extern void SN_close_env(struct SN_env * z, int S_size);
|
||||
|
||||
extern int SN_set_current(struct SN_env * z, int size, const symbol * s);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue