Commit 46a25ce6 authored by Teodor Sigaev's avatar Teodor Sigaev

1 Fix bug with very short word: prefix and suffix might be overlapped,

  sorry but fix can't be applyed to previous version: it's require
  refill tsvector...
2 Small optimize of load time for huge dictionaries
3 use palloc instead of malloc during load dict file
parent a815a579
This diff is collapsed.
......@@ -32,7 +32,6 @@ typedef struct SPNode
typedef struct spell_struct
{
char *word;
union
{
char flag[16];
......@@ -41,9 +40,12 @@ typedef struct spell_struct
int affix;
int len;
} d;
} p;
} p;
char word[1];
} SPELL;
#define SPELLHDRSZ (offsetof(SPELL, word))
typedef struct aff_struct
{
uint32
......@@ -106,7 +108,7 @@ typedef struct
int nspell;
int mspell;
SPELL *Spell;
SPELL **Spell;
AffixNode *Suffix;
AffixNode *Prefix;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment