Fossil SCM

Fix the (obsolete) "fossil search" command.

drh 2015-03-02 22:38 trunk
Commit 83509c149eb0542b97e7b2e1d1ce260bcc94db72
1 file changed +3 -2
+3 -2
--- src/search.c
+++ src/search.c
@@ -569,13 +569,14 @@
569569
"CREATE TEMP TABLE srch(rid,uuid,date,comment,x);"
570570
"CREATE INDEX srch_idx1 ON srch(x);"
571571
"INSERT INTO srch(rid,uuid,date,comment,x)"
572572
" SELECT blob.rid, uuid, datetime(event.mtime%s),"
573573
" coalesce(ecomment,comment),"
574
- " score(coalesce(ecomment,comment)) AS y"
574
+ " search_score()"
575575
" FROM event, blob"
576
- " WHERE blob.rid=event.objid AND y>0;",
576
+ " WHERE blob.rid=event.objid"
577
+ " AND search_match(coalesce(ecomment,comment));",
577578
timeline_utc()
578579
);
579580
iBest = db_int(0, "SELECT max(x) FROM srch");
580581
blob_append(&sql,
581582
"SELECT rid, uuid, date, comment, 0, 0 FROM srch "
582583
--- src/search.c
+++ src/search.c
@@ -569,13 +569,14 @@
569 "CREATE TEMP TABLE srch(rid,uuid,date,comment,x);"
570 "CREATE INDEX srch_idx1 ON srch(x);"
571 "INSERT INTO srch(rid,uuid,date,comment,x)"
572 " SELECT blob.rid, uuid, datetime(event.mtime%s),"
573 " coalesce(ecomment,comment),"
574 " score(coalesce(ecomment,comment)) AS y"
575 " FROM event, blob"
576 " WHERE blob.rid=event.objid AND y>0;",
 
577 timeline_utc()
578 );
579 iBest = db_int(0, "SELECT max(x) FROM srch");
580 blob_append(&sql,
581 "SELECT rid, uuid, date, comment, 0, 0 FROM srch "
582
--- src/search.c
+++ src/search.c
@@ -569,13 +569,14 @@
569 "CREATE TEMP TABLE srch(rid,uuid,date,comment,x);"
570 "CREATE INDEX srch_idx1 ON srch(x);"
571 "INSERT INTO srch(rid,uuid,date,comment,x)"
572 " SELECT blob.rid, uuid, datetime(event.mtime%s),"
573 " coalesce(ecomment,comment),"
574 " search_score()"
575 " FROM event, blob"
576 " WHERE blob.rid=event.objid"
577 " AND search_match(coalesce(ecomment,comment));",
578 timeline_utc()
579 );
580 iBest = db_int(0, "SELECT max(x) FROM srch");
581 blob_append(&sql,
582 "SELECT rid, uuid, date, comment, 0, 0 FROM srch "
583

Keyboard Shortcuts

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