Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Remove a redundant "if( rc==SQLITE_OK )" from the fts5 bm25() code. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d85f4f27f58adcc75fc7d59e63af95b2 |
User & Date: | dan 2020-11-27 16:08:15 |
Context
2020-11-27
| ||
16:15 | Add missing cast to fts5 bm25() code. (check-in: 6ff96738 user: dan tags: trunk) | |
16:08 | Remove a redundant "if( rc==SQLITE_OK )" from the fts5 bm25() code. (check-in: d85f4f27 user: dan tags: trunk) | |
16:05 | Move an "if( rc==SQLITE_OK )" to outside a loop body in the fts5 bm25() code. (check-in: 14a4dcf3 user: dan tags: trunk) | |
Changes
Changes to ext/fts5/fts5_aux.c.
︙ | ︙ | |||
668 669 670 671 672 673 674 | /* Figure out the total size of the current row in tokens. */ if( rc==SQLITE_OK ){ int nTok; rc = pApi->xColumnSize(pFts, -1, &nTok); D = (double)nTok; } | | > < < < < < | 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | /* Figure out the total size of the current row in tokens. */ if( rc==SQLITE_OK ){ int nTok; rc = pApi->xColumnSize(pFts, -1, &nTok); D = (double)nTok; } /* Determine and return the BM25 score for the current row. Or, if an ** error has occurred, throw an exception. */ if( rc==SQLITE_OK ){ for(i=0; i<pData->nPhrase; i++){ score += pData->aIDF[i] * ( ( aFreq[i] * (k1 + 1.0) ) / ( aFreq[i] + k1 * (1 - b + b * D / pData->avgdl) ) ); } sqlite3_result_double(pCtx, -1.0 * score); }else{ sqlite3_result_error_code(pCtx, rc); } } int sqlite3Fts5AuxInit(fts5_api *pApi){ |
︙ | ︙ |