Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Ensure that the pattern string for search is all lower-case, so that FTS5 keywords like NOT and AND cannot cause confusion and errors. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
ec68aaf42536b4fb48614a66fcd8bb8d |
| User & Date: | drh 2024-06-24 06:09:39.720 |
References
|
2024-07-03
| ||
| 10:26 | Apply the logic in/around [ec68aaf42536b4fb] to the chat search so that it does not abort, and generate an error log entry, when given characters which fts5 does not like. ... (Closed-Leaf check-in: b698ba9942 user: stephan tags: fts5-chat-search) | |
Context
|
2024-06-25
| ||
| 06:30 | Update to the latest pikchr in order to fix the bug in "with .start at ..." positioning. ... (check-in: 390e00134e user: drh tags: trunk) | |
|
2024-06-24
| ||
| 20:52 | Add new page /chat-search, for searching chat history. ... (check-in: 89f82e6603 user: dan tags: fts5-chat-search) | |
| 06:09 | Ensure that the pattern string for search is all lower-case, so that FTS5 keywords like NOT and AND cannot cause confusion and errors. ... (check-in: ec68aaf425 user: drh tags: trunk) | |
|
2024-06-23
| ||
| 18:38 | Small help text fix in the unversioned command. ... (check-in: bdc8b4a406 user: stephan tags: trunk) | |
Changes
Changes to src/search.c.
| ︙ | ︙ | |||
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 |
int i;
static const char *zSnippetCall;
if( srchFlags==0 ) return;
sqlite3_create_function(g.db, "rank", 1, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
search_rank_sqlfunc, 0, 0);
for(i=0; zPat[i]; i++){
if( (zPat[i]&0x80)==0 && !fossil_isalnum(zPat[i]) ) zPat[i] = ' ';
}
for(i--; i>=0 && zPat[i]==' '; i--){}
if( i<0 ){
fossil_free(zPat);
zPat = mprintf("\"\"");
}
blob_init(&sql, 0, 0);
| > | 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 |
int i;
static const char *zSnippetCall;
if( srchFlags==0 ) return;
sqlite3_create_function(g.db, "rank", 1, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
search_rank_sqlfunc, 0, 0);
for(i=0; zPat[i]; i++){
if( (zPat[i]&0x80)==0 && !fossil_isalnum(zPat[i]) ) zPat[i] = ' ';
if( fossil_isupper(zPat[i]) ) zPat[i] = fossil_tolower(zPat[i]);
}
for(i--; i>=0 && zPat[i]==' '; i--){}
if( i<0 ){
fossil_free(zPat);
zPat = mprintf("\"\"");
}
blob_init(&sql, 0, 0);
|
| ︙ | ︙ |