mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Adjust the costs in the xBestIndex function of the spellfix1 virtual table
to force the use of the MATCH term if it is available. FossilOrigin-Name: f003bea9fe1b79e2b4d18fbef86c1d8f0f60e4b6
This commit is contained in:
@ -2148,10 +2148,10 @@ static int spellfix1BestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
|
||||
pIdxInfo->aConstraintUsage[iDistTerm].argvIndex = idx++;
|
||||
pIdxInfo->aConstraintUsage[iDistTerm].omit = 1;
|
||||
}
|
||||
pIdxInfo->estimatedCost = (double)10000;
|
||||
pIdxInfo->estimatedCost = 1e5;
|
||||
}else{
|
||||
pIdxInfo->idxNum = 0;
|
||||
pIdxInfo->estimatedCost = (double)10000000;
|
||||
pIdxInfo->estimatedCost = 1e50;
|
||||
}
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user