Fossil SCM

Reconcile a test in the FTS search with its original intent in [196dfedf7fc]; reported in [forum:fa13ae06d|forum post fa13ae06d].

danield 2023-07-13 12:13 trunk
Commit e88211628b529e08fc5f0c647fc789cbc5713065cc3f2d456c1d95451caed7d8
1 file changed +1 -1
+1 -1
--- src/search.c
+++ src/search.c
@@ -926,11 +926,11 @@
926926
static const char *zSnippetCall;
927927
if( srchFlags==0 ) return;
928928
sqlite3_create_function(g.db, "rank", 1, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
929929
search_rank_sqlfunc, 0, 0);
930930
for(i=0; zPat[i]; i++){
931
- if( (zPat[i]&0x80)!=0 || !fossil_isalnum(zPat[i]) ) zPat[i] = ' ';
931
+ if( (zPat[i]&0x80)==0 && !fossil_isalnum(zPat[i]) ) zPat[i] = ' ';
932932
}
933933
blob_init(&sql, 0, 0);
934934
if( search_index_type(0)==4 ){
935935
/* If this repo is still using the legacy FTS4 search index, then
936936
** the snippet() function is slightly different */
937937
--- src/search.c
+++ src/search.c
@@ -926,11 +926,11 @@
926 static const char *zSnippetCall;
927 if( srchFlags==0 ) return;
928 sqlite3_create_function(g.db, "rank", 1, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
929 search_rank_sqlfunc, 0, 0);
930 for(i=0; zPat[i]; i++){
931 if( (zPat[i]&0x80)!=0 || !fossil_isalnum(zPat[i]) ) zPat[i] = ' ';
932 }
933 blob_init(&sql, 0, 0);
934 if( search_index_type(0)==4 ){
935 /* If this repo is still using the legacy FTS4 search index, then
936 ** the snippet() function is slightly different */
937
--- src/search.c
+++ src/search.c
@@ -926,11 +926,11 @@
926 static const char *zSnippetCall;
927 if( srchFlags==0 ) return;
928 sqlite3_create_function(g.db, "rank", 1, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
929 search_rank_sqlfunc, 0, 0);
930 for(i=0; zPat[i]; i++){
931 if( (zPat[i]&0x80)==0 && !fossil_isalnum(zPat[i]) ) zPat[i] = ' ';
932 }
933 blob_init(&sql, 0, 0);
934 if( search_index_type(0)==4 ){
935 /* If this repo is still using the legacy FTS4 search index, then
936 ** the snippet() function is slightly different */
937

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button