Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-15 Thread Alexey Pechnikov
2011/7/15 Dan Kennedy : >> But queries to original text will not work: >> select text from fts where fts match 'sqlite educate'; > > I think it will. Query strings - like 'sqlite educate' - are > also parsed using the tokenizer. So the query will be transformed > to 'dbms

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-15 Thread Dan Kennedy
On 07/15/2011 01:10 PM, Alexey Pechnikov wrote: > 2011/7/15 Dan Kennedy: >> I think you could just have the tokenizer return "dbms" whenever >> it sees "sqlite" in the input. > > But queries to original text will not work: > select text from fts where fts match 'sqlite

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-15 Thread Alexey Pechnikov
2011/7/15 Dan Kennedy : > I think you could just have the tokenizer return "dbms" whenever > it sees "sqlite" in the input. But queries to original text will not work: select text from fts where fts match 'sqlite educate'; You can see synonyms dictionary in PostgreSQL

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Dan Kennedy
On 07/15/2011 03:28 AM, Alexey Pechnikov wrote: > I want to add the table CREATE TABLE ext_fts_synonyms(word text not > null unique, synonym text not null); insert into > ext_fts_synonyms('sqlite','sqlite dbms'); > > And replace in tokenizer the term 'sqlite' to 2 terms 'sqlite' and > 'dbms' for

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Alexey Pechnikov
I want to add the table CREATE TABLE ext_fts_synonyms(word text not null unique, synonym text not null); insert into ext_fts_synonyms('sqlite','sqlite dbms'); And replace in tokenizer the term 'sqlite' to 2 terms 'sqlite' and 'dbms' for search by queries like to > select text from fts where fts

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Dan Kennedy
On 07/14/2011 07:42 PM, Alexey Pechnikov wrote: >> No. Don't return anything for a stop word. Just advance to the next >> non stop-word token and return it. > > Thanks, I did and it's work. > > And another question... Is there any way to use multi-word synonyms? Like to: > sqlite -> Open Source

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Alexey Pechnikov
> No. Don't return anything for a stop word. Just advance to the next > non stop-word token and return it. Thanks, I did and it's work. And another question... Is there any way to use multi-word synonyms? Like to: sqlite -> Open Source SQLite DBMS I think the single token "Open Source SQLite

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Dan Kennedy
On 07/14/2011 05:29 PM, Alexey Pechnikov wrote: > With 0-length token in icuNext there is the error: > Error: SQL logic error or missing database > > May xNext returns 0 length when the token is stopword? No. Don't return anything for a stop word. Just advance to the next non stop-word token and

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Alexey Pechnikov
With 0-length token in icuNext there is the error: Error: SQL logic error or missing database May xNext returns 0 length when the token is stopword? -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list

Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-13 Thread Dan Kennedy
On 07/13/2011 05:05 PM, Alexey Pechnikov wrote: > With synonyms dictionary the result token length can be more then > original token length. > Is it problem for current realization of FTS? I don't think so. If it is, it's a bug. Dan. ___ sqlite-users

[sqlite] FTS3: synonyms dictionary and tokens length

2011-07-13 Thread Alexey Pechnikov
With synonyms dictionary the result token length can be more then original token length. Is it problem for current realization of FTS? -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org