Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Search improvements: Limit the number of search results to the value in the "search-limit" setting, or 100 results if the setting is omitted. And, show the date of each article if the date is not included as part of the title. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
13dfcdd9576baa4656797db889401ae4 |
| User & Date: | drh 2020-06-16 20:46:30.358 |
Context
|
2020-06-17
| ||
| 14:38 | Include first-generation simple cherrypicks in ancestor graphs on the timeline. check-in: 5a23a724ae user: drh tags: trunk | |
|
2020-06-16
| ||
| 20:46 | Search improvements: Limit the number of search results to the value in the "search-limit" setting, or 100 results if the setting is omitted. And, show the date of each article if the date is not included as part of the title. check-in: 13dfcdd957 user: drh tags: trunk | |
| 14:40 | Add a link to /fileedit from /sitemap, so that it appears in the hamburger menu when it is enabled. check-in: cc17add265 user: drh tags: trunk | |
Changes
Changes to src/search.c.
| ︙ | |||
1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 | 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 | + + + + - + + - + + + + + + |
int search_run_and_output(
const char *zPattern, /* The query pattern */
unsigned int srchFlags, /* What to search over */
int fDebug /* Extra debugging output */
){
Stmt q;
int nRow = 0;
int nLimit = db_get_int("search-limit", 100);
if( P("searchlimit")!=0 ){
nLimit = atoi(P("searchlimit"));
}
srchFlags = search_restrict(srchFlags);
if( srchFlags==0 ) return 0;
search_sql_setup(g.db);
add_content_sql_commands(g.db);
db_multi_exec(
"CREATE TEMP TABLE x(label,url,score,id,date,snip);"
);
if( !search_index_exists() ){
search_fullscan(zPattern, srchFlags); /* Full-scan search */
}else{
search_update_index(srchFlags); /* Update the index, if necessary */
search_indexed(zPattern, srchFlags); /* Indexed search */
}
|
| ︙ |