1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Fix a problem in FTS to do with ^ tokens and the snippet() function.

FossilOrigin-Name: 2c03b24f4cc6f2c28c9d5b9984320d41b8486c32
This commit is contained in:
dan
2011-10-19 09:40:49 +00:00
parent 3f1ea8d114
commit 50a7544d6f
5 changed files with 37 additions and 14 deletions

View File

@ -2391,6 +2391,7 @@ static void fts3DoclistFirstFilter(
fts3PutDeltaVarint3(&pOut, bDescDoclist, &iPrev, &bFirstOut, iDoc);
bWritten = 1;
}
*pOut++ = 0x01;
pOut += sqlite3Fts3PutVarint(pOut, iCol);
*pOut++ = 0x02;
}

View File

@ -368,6 +368,7 @@ static int fts3SnippetFindPositions(Fts3Expr *pExpr, int iPhrase, void *ctx){
int iFirst = 0;
pPhrase->pList = pCsr;
fts3GetDeltaPosition(&pCsr, &iFirst);
assert( iFirst>=0 );
pPhrase->pHead = pCsr;
pPhrase->pTail = pCsr;
pPhrase->iHead = iFirst;