Hello,
On 2016-03-23 07:32, Dan Kennedy wrote:
> On 03/23/2016 10:48 AM, ????? wrote:
>> I build a table using fts5,like this,
>> CREATE VIRTUAL TABLE tbl_tha using fts5( key1, key2,TOKENIZE="thai");
>>
>> and then insert a record:
>> insert into tbl_tha values('??????','??????');
>> [...]
>> SQL1:select * from tbl_tha where tbl_tha match '????????????';
>> [...]
>> SQL2 can query the result,but SQL1 return null;
>
> [...] So SQL1 is equivalent to:
>
> ... MATCH "??? + ??? + ???? + ??"
You can change that behavior by changing
``fts5_expr.c:fts5ExprGetToken()'' in such a way that it will split a
text into separate tokens, for example:
change:
======
for(z2=&z[1]; sqlite3Fts5IsBareword(*z2); z2++);
pToken->n = (z2 - z);
======
to something like:
======
for(z2=&z[1]; sqlite3Fts5IsBareword(*z2); z2++) {
if ( isLastCharOfWord(z2) ) {
z2 = &z2[numberOfBytesOfChar(z2)];
break;
}
}
pToken->n = (z2 - z);
======
However you must notice, that such correction breaks rules mentioned by
Dan Kennedy and have an impact on a whole FTS5 mechanism.
-- best regards
Cezary H. Noweta