Add a test for an fts5 tokenizer that supports synonyms by adding multiple entries to the fts index.
FossilOrigin-Name: 98d07d16cab92f1e7001afbe370df3ec6343fc1f
This commit is contained in:
@@ -367,7 +367,7 @@ static int fts5StorageInsertCallback(
|
||||
){
|
||||
Fts5InsertCtx *pCtx = (Fts5InsertCtx*)pContext;
|
||||
Fts5Index *pIdx = pCtx->pStorage->pIndex;
|
||||
if( (tflags & FTS5_TOKEN_COLOCATED)==0 ){
|
||||
if( (tflags & FTS5_TOKEN_COLOCATED)==0 || pCtx->szCol==0 ){
|
||||
pCtx->szCol++;
|
||||
}
|
||||
return sqlite3Fts5IndexWrite(pIdx, pCtx->iCol, pCtx->szCol-1, pToken, nToken);
|
||||
@@ -852,7 +852,7 @@ static int fts5StorageIntegrityCallback(
|
||||
int iEnd /* End offset of token */
|
||||
){
|
||||
Fts5IntegrityCtx *pCtx = (Fts5IntegrityCtx*)pContext;
|
||||
if( (tflags & FTS5_TOKEN_COLOCATED)==0 ){
|
||||
if( (tflags & FTS5_TOKEN_COLOCATED)==0 || pCtx->szCol==0 ){
|
||||
pCtx->szCol++;
|
||||
}
|
||||
pCtx->cksum ^= sqlite3Fts5IndexCksum(
|
||||
|
||||
Reference in New Issue
Block a user