Fossil SCM

Extend FTS index support to enable selection of different tokenizers, to support searching of Chinese content.

stephan 2023-04-18 17:47 trunk merge
Commit 0e5d27fe18cad3a00c54ace4ab3e41d302fb140b17531ec15d5fa17ec37339dc
3 files changed +107 -13 +19 -2 +18 -16
+107 -13
--- src/search.c
+++ src/search.c
@@ -1512,11 +1512,14 @@
15121512
fossil_print("%s\n",blob_str(&out));
15131513
blob_reset(&in);
15141514
blob_reset(&out);
15151515
}
15161516
1517
-/* The schema for the full-text index
1517
+/*
1518
+** The schema for the full-text index. The %s part must be an empty
1519
+** string or a comma followed by additional flags for the FTS virtual
1520
+** table.
15181521
*/
15191522
static const char zFtsSchema[] =
15201523
@ -- One entry for each possible search result
15211524
@ CREATE TABLE IF NOT EXISTS repository.ftsdocs(
15221525
@ rowid INTEGER PRIMARY KEY, -- Maps to the ftsidx.rowid
@@ -1542,18 +1545,100 @@
15421545
static const char zFtsDrop[] =
15431546
@ DROP TABLE IF EXISTS repository.ftsidx;
15441547
@ DROP VIEW IF EXISTS repository.ftscontent;
15451548
@ DROP TABLE IF EXISTS repository.ftsdocs;
15461549
;
1550
+
1551
+#if INTERFACE
1552
+/*
1553
+** Values for the search-tokenizer config option.
1554
+*/
1555
+#define FTS5TOK_NONE 0 /* no FTS stemmer */
1556
+#define FTS5TOK_PORTER 1 /* porter stemmer */
1557
+#define FTS5TOK_TRIGRAM 3 /* trigram stemmer */
1558
+#endif
1559
+
1560
+/*
1561
+** Cached FTS5TOK_xyz value for search_tokenizer_type() and
1562
+** friends.
1563
+*/
1564
+static int iFtsTokenizer = -1;
1565
+
1566
+/*
1567
+** Returns one of the FTS5TOK_xyz values, depending on the value of
1568
+** the search-tokenizer config entry, defaulting to FTS5TOK_NONE. The
1569
+** result of the first call is cached for subsequent calls unless
1570
+** bRecheck is true.
1571
+*/
1572
+int search_tokenizer_type(int bRecheck){
1573
+ char *z;
1574
+ if( iFtsTokenizer>=0 && bRecheck==0 ){
1575
+ return iFtsTokenizer;
1576
+ }
1577
+ z = db_get("search-tokenizer",0);
1578
+ if( 0==z ){
1579
+ iFtsTokenizer = FTS5TOK_NONE;
1580
+ }else if(0==fossil_strcmp(z,"porter")){
1581
+ iFtsTokenizer = FTS5TOK_PORTER;
1582
+ }else if(0==fossil_strcmp(z,"trigram")){
1583
+ iFtsTokenizer = FTS5TOK_TRIGRAM;
1584
+ }else{
1585
+ iFtsTokenizer = is_truth(z) ? FTS5TOK_PORTER : FTS5TOK_NONE;
1586
+ }
1587
+ fossil_free(z);
1588
+ return iFtsTokenizer;
1589
+}
1590
+
1591
+/*
1592
+** Returns a string value suitable for use as the search-tokenizer
1593
+** setting's value, depending on the value of z. If z is 0 then the
1594
+** current search-tokenizer value is used as the basis for formulating
1595
+** the result (which may differ from the current value but will have
1596
+** the same meaning). Any unknown/unsupported value is interpreted as
1597
+** "off".
1598
+*/
1599
+const char *search_tokenizer_for_string(const char *z){
1600
+ char * zTmp = 0;
1601
+ const char *zRc = 0;
1602
+
1603
+ if( 0==z ){
1604
+ z = zTmp = db_get("search-tokenizer",0);
1605
+ }
1606
+ if( 0==z ){
1607
+ zRc = "off";
1608
+ }else if( 0==fossil_strcmp(z,"porter") ){
1609
+ zRc = "porter";
1610
+ }else if( 0==fossil_strcmp(z,"trigram") ){
1611
+ zRc = "trigram";
1612
+ }else{
1613
+ zRc = is_truth(z) ? "porter" : "off";
1614
+ }
1615
+ fossil_free(zTmp);
1616
+ return zRc;
1617
+}
1618
+
1619
+/*
1620
+** Sets the search-tokenizer config setting to the value of
1621
+** search_tokenizer_for_string(zName).
1622
+*/
1623
+void search_set_tokenizer(const char *zName){
1624
+ db_set("search-tokenizer", search_tokenizer_for_string( zName ), 0);
1625
+ iFtsTokenizer = -1;
1626
+}
15471627
15481628
/*
15491629
** Create or drop the tables associated with a full-text index.
15501630
*/
15511631
static int searchIdxExists = -1;
15521632
void search_create_index(void){
1553
- int useStemmer = db_get_boolean("search-stemmer",0);
1554
- const char *zExtra = useStemmer ? ",tokenize=porter" : "";
1633
+ const int useTokenizer = search_tokenizer_type(0);
1634
+ const char *zExtra;
1635
+ switch(useTokenizer){
1636
+ case FTS5TOK_PORTER: zExtra = ",tokenize=porter"; break;
1637
+ case FTS5TOK_TRIGRAM: zExtra = ",tokenize=trigram"; break;
1638
+ default: zExtra = ""; break;
1639
+ }
15551640
search_sql_setup(g.db);
15561641
db_multi_exec(zFtsSchema/*works-like:"%s"*/, zExtra/*safe-for-%s*/);
15571642
searchIdxExists = 1;
15581643
}
15591644
void search_drop_index(void){
@@ -1894,12 +1979,14 @@
18941979
** enable cdtwe Enable various kinds of search. c=Check-ins,
18951980
** d=Documents, t=Tickets, w=Wiki, e=Tech Notes.
18961981
**
18971982
** disable cdtwe Disable various kinds of search
18981983
**
1899
-** stemmer (on|off) Turn the Porter stemmer on or off for indexed
1900
-** search. (Unindexed search is never stemmed.)
1984
+** tokenizer VALUE Select a tokenizer for indexed search. VALUE
1985
+** may be one of (porter, on, off, trigram), and
1986
+** "on" is equivalent to "porter". Unindexed
1987
+** search never uses tokenization or stemming.
19011988
**
19021989
** The current search settings are displayed after any changes are applied.
19031990
** Run this command with no arguments to simply see the settings.
19041991
*/
19051992
void fts_config_cmd(void){
@@ -1909,11 +1996,11 @@
19091996
} aCmd[] = {
19101997
{ 1, "reindex" },
19111998
{ 2, "index" },
19121999
{ 3, "disable" },
19132000
{ 4, "enable" },
1914
- { 5, "stemmer" },
2001
+ { 5, "tokenizer"},
19152002
};
19162003
static const struct {
19172004
const char *zSetting;
19182005
const char *zName;
19192006
const char *zSw;
@@ -1966,16 +2053,23 @@
19662053
for(j=0; j<count(aSetng); j++){
19672054
if( strchr(zCtrl, aSetng[j].zSw[0])!=0 ){
19682055
db_set_int(aSetng[j].zSetting/*works-like:"x"*/, iCmd-3, 0);
19692056
}
19702057
}
2058
+ }else if( iCmd==5 ){
2059
+ int iOldTokenizer, iNewTokenizer;
2060
+ if( g.argc<4 ) usage("tokenizer porter|on|off|trigram");
2061
+ iOldTokenizer = search_tokenizer_type(0);
2062
+ db_set("search-tokenizer",
2063
+ search_tokenizer_for_string(g.argv[3]), 0);
2064
+ iNewTokenizer = search_tokenizer_type(1);
2065
+ if( iOldTokenizer!=iNewTokenizer ){
2066
+ /* Drop or rebuild index if tokenizer changes. */
2067
+ iAction = 1 + ((iOldTokenizer && iNewTokenizer)
2068
+ ? 1 : (iNewTokenizer ? 1 : 0));
2069
+ }
19712070
}
1972
- if( iCmd==5 ){
1973
- if( g.argc<4 ) usage("porter ON/OFF");
1974
- db_set_int("search-stemmer", is_truth(g.argv[3]), 0);
1975
- }
1976
-
19772071
19782072
/* destroy or rebuild the index, if requested */
19792073
if( iAction>=1 ){
19802074
search_drop_index();
19812075
}
@@ -1986,12 +2080,12 @@
19862080
/* Always show the status before ending */
19872081
for(i=0; i<count(aSetng); i++){
19882082
fossil_print("%-17s %s\n", aSetng[i].zName,
19892083
db_get_boolean(aSetng[i].zSetting,0) ? "on" : "off");
19902084
}
1991
- fossil_print("%-17s %s\n", "Porter stemmer:",
1992
- db_get_boolean("search-stemmer",0) ? "on" : "off");
2085
+ fossil_print("%-17s %s\n", "tokenizer:",
2086
+ search_tokenizer_for_string(0));
19932087
if( search_index_exists() ){
19942088
fossil_print("%-17s FTS%d\n", "full-text index:", search_index_type(1));
19952089
fossil_print("%-17s %d\n", "documents:",
19962090
db_int(0, "SELECT count(*) FROM ftsdocs"));
19972091
}else{
19982092
--- src/search.c
+++ src/search.c
@@ -1512,11 +1512,14 @@
1512 fossil_print("%s\n",blob_str(&out));
1513 blob_reset(&in);
1514 blob_reset(&out);
1515 }
1516
1517 /* The schema for the full-text index
 
 
 
1518 */
1519 static const char zFtsSchema[] =
1520 @ -- One entry for each possible search result
1521 @ CREATE TABLE IF NOT EXISTS repository.ftsdocs(
1522 @ rowid INTEGER PRIMARY KEY, -- Maps to the ftsidx.rowid
@@ -1542,18 +1545,100 @@
1542 static const char zFtsDrop[] =
1543 @ DROP TABLE IF EXISTS repository.ftsidx;
1544 @ DROP VIEW IF EXISTS repository.ftscontent;
1545 @ DROP TABLE IF EXISTS repository.ftsdocs;
1546 ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1547
1548 /*
1549 ** Create or drop the tables associated with a full-text index.
1550 */
1551 static int searchIdxExists = -1;
1552 void search_create_index(void){
1553 int useStemmer = db_get_boolean("search-stemmer",0);
1554 const char *zExtra = useStemmer ? ",tokenize=porter" : "";
 
 
 
 
 
1555 search_sql_setup(g.db);
1556 db_multi_exec(zFtsSchema/*works-like:"%s"*/, zExtra/*safe-for-%s*/);
1557 searchIdxExists = 1;
1558 }
1559 void search_drop_index(void){
@@ -1894,12 +1979,14 @@
1894 ** enable cdtwe Enable various kinds of search. c=Check-ins,
1895 ** d=Documents, t=Tickets, w=Wiki, e=Tech Notes.
1896 **
1897 ** disable cdtwe Disable various kinds of search
1898 **
1899 ** stemmer (on|off) Turn the Porter stemmer on or off for indexed
1900 ** search. (Unindexed search is never stemmed.)
 
 
1901 **
1902 ** The current search settings are displayed after any changes are applied.
1903 ** Run this command with no arguments to simply see the settings.
1904 */
1905 void fts_config_cmd(void){
@@ -1909,11 +1996,11 @@
1909 } aCmd[] = {
1910 { 1, "reindex" },
1911 { 2, "index" },
1912 { 3, "disable" },
1913 { 4, "enable" },
1914 { 5, "stemmer" },
1915 };
1916 static const struct {
1917 const char *zSetting;
1918 const char *zName;
1919 const char *zSw;
@@ -1966,16 +2053,23 @@
1966 for(j=0; j<count(aSetng); j++){
1967 if( strchr(zCtrl, aSetng[j].zSw[0])!=0 ){
1968 db_set_int(aSetng[j].zSetting/*works-like:"x"*/, iCmd-3, 0);
1969 }
1970 }
 
 
 
 
 
 
 
 
 
 
 
 
1971 }
1972 if( iCmd==5 ){
1973 if( g.argc<4 ) usage("porter ON/OFF");
1974 db_set_int("search-stemmer", is_truth(g.argv[3]), 0);
1975 }
1976
1977
1978 /* destroy or rebuild the index, if requested */
1979 if( iAction>=1 ){
1980 search_drop_index();
1981 }
@@ -1986,12 +2080,12 @@
1986 /* Always show the status before ending */
1987 for(i=0; i<count(aSetng); i++){
1988 fossil_print("%-17s %s\n", aSetng[i].zName,
1989 db_get_boolean(aSetng[i].zSetting,0) ? "on" : "off");
1990 }
1991 fossil_print("%-17s %s\n", "Porter stemmer:",
1992 db_get_boolean("search-stemmer",0) ? "on" : "off");
1993 if( search_index_exists() ){
1994 fossil_print("%-17s FTS%d\n", "full-text index:", search_index_type(1));
1995 fossil_print("%-17s %d\n", "documents:",
1996 db_int(0, "SELECT count(*) FROM ftsdocs"));
1997 }else{
1998
--- src/search.c
+++ src/search.c
@@ -1512,11 +1512,14 @@
1512 fossil_print("%s\n",blob_str(&out));
1513 blob_reset(&in);
1514 blob_reset(&out);
1515 }
1516
1517 /*
1518 ** The schema for the full-text index. The %s part must be an empty
1519 ** string or a comma followed by additional flags for the FTS virtual
1520 ** table.
1521 */
1522 static const char zFtsSchema[] =
1523 @ -- One entry for each possible search result
1524 @ CREATE TABLE IF NOT EXISTS repository.ftsdocs(
1525 @ rowid INTEGER PRIMARY KEY, -- Maps to the ftsidx.rowid
@@ -1542,18 +1545,100 @@
1545 static const char zFtsDrop[] =
1546 @ DROP TABLE IF EXISTS repository.ftsidx;
1547 @ DROP VIEW IF EXISTS repository.ftscontent;
1548 @ DROP TABLE IF EXISTS repository.ftsdocs;
1549 ;
1550
1551 #if INTERFACE
1552 /*
1553 ** Values for the search-tokenizer config option.
1554 */
1555 #define FTS5TOK_NONE 0 /* no FTS stemmer */
1556 #define FTS5TOK_PORTER 1 /* porter stemmer */
1557 #define FTS5TOK_TRIGRAM 3 /* trigram stemmer */
1558 #endif
1559
1560 /*
1561 ** Cached FTS5TOK_xyz value for search_tokenizer_type() and
1562 ** friends.
1563 */
1564 static int iFtsTokenizer = -1;
1565
1566 /*
1567 ** Returns one of the FTS5TOK_xyz values, depending on the value of
1568 ** the search-tokenizer config entry, defaulting to FTS5TOK_NONE. The
1569 ** result of the first call is cached for subsequent calls unless
1570 ** bRecheck is true.
1571 */
1572 int search_tokenizer_type(int bRecheck){
1573 char *z;
1574 if( iFtsTokenizer>=0 && bRecheck==0 ){
1575 return iFtsTokenizer;
1576 }
1577 z = db_get("search-tokenizer",0);
1578 if( 0==z ){
1579 iFtsTokenizer = FTS5TOK_NONE;
1580 }else if(0==fossil_strcmp(z,"porter")){
1581 iFtsTokenizer = FTS5TOK_PORTER;
1582 }else if(0==fossil_strcmp(z,"trigram")){
1583 iFtsTokenizer = FTS5TOK_TRIGRAM;
1584 }else{
1585 iFtsTokenizer = is_truth(z) ? FTS5TOK_PORTER : FTS5TOK_NONE;
1586 }
1587 fossil_free(z);
1588 return iFtsTokenizer;
1589 }
1590
1591 /*
1592 ** Returns a string value suitable for use as the search-tokenizer
1593 ** setting's value, depending on the value of z. If z is 0 then the
1594 ** current search-tokenizer value is used as the basis for formulating
1595 ** the result (which may differ from the current value but will have
1596 ** the same meaning). Any unknown/unsupported value is interpreted as
1597 ** "off".
1598 */
1599 const char *search_tokenizer_for_string(const char *z){
1600 char * zTmp = 0;
1601 const char *zRc = 0;
1602
1603 if( 0==z ){
1604 z = zTmp = db_get("search-tokenizer",0);
1605 }
1606 if( 0==z ){
1607 zRc = "off";
1608 }else if( 0==fossil_strcmp(z,"porter") ){
1609 zRc = "porter";
1610 }else if( 0==fossil_strcmp(z,"trigram") ){
1611 zRc = "trigram";
1612 }else{
1613 zRc = is_truth(z) ? "porter" : "off";
1614 }
1615 fossil_free(zTmp);
1616 return zRc;
1617 }
1618
1619 /*
1620 ** Sets the search-tokenizer config setting to the value of
1621 ** search_tokenizer_for_string(zName).
1622 */
1623 void search_set_tokenizer(const char *zName){
1624 db_set("search-tokenizer", search_tokenizer_for_string( zName ), 0);
1625 iFtsTokenizer = -1;
1626 }
1627
1628 /*
1629 ** Create or drop the tables associated with a full-text index.
1630 */
1631 static int searchIdxExists = -1;
1632 void search_create_index(void){
1633 const int useTokenizer = search_tokenizer_type(0);
1634 const char *zExtra;
1635 switch(useTokenizer){
1636 case FTS5TOK_PORTER: zExtra = ",tokenize=porter"; break;
1637 case FTS5TOK_TRIGRAM: zExtra = ",tokenize=trigram"; break;
1638 default: zExtra = ""; break;
1639 }
1640 search_sql_setup(g.db);
1641 db_multi_exec(zFtsSchema/*works-like:"%s"*/, zExtra/*safe-for-%s*/);
1642 searchIdxExists = 1;
1643 }
1644 void search_drop_index(void){
@@ -1894,12 +1979,14 @@
1979 ** enable cdtwe Enable various kinds of search. c=Check-ins,
1980 ** d=Documents, t=Tickets, w=Wiki, e=Tech Notes.
1981 **
1982 ** disable cdtwe Disable various kinds of search
1983 **
1984 ** tokenizer VALUE Select a tokenizer for indexed search. VALUE
1985 ** may be one of (porter, on, off, trigram), and
1986 ** "on" is equivalent to "porter". Unindexed
1987 ** search never uses tokenization or stemming.
1988 **
1989 ** The current search settings are displayed after any changes are applied.
1990 ** Run this command with no arguments to simply see the settings.
1991 */
1992 void fts_config_cmd(void){
@@ -1909,11 +1996,11 @@
1996 } aCmd[] = {
1997 { 1, "reindex" },
1998 { 2, "index" },
1999 { 3, "disable" },
2000 { 4, "enable" },
2001 { 5, "tokenizer"},
2002 };
2003 static const struct {
2004 const char *zSetting;
2005 const char *zName;
2006 const char *zSw;
@@ -1966,16 +2053,23 @@
2053 for(j=0; j<count(aSetng); j++){
2054 if( strchr(zCtrl, aSetng[j].zSw[0])!=0 ){
2055 db_set_int(aSetng[j].zSetting/*works-like:"x"*/, iCmd-3, 0);
2056 }
2057 }
2058 }else if( iCmd==5 ){
2059 int iOldTokenizer, iNewTokenizer;
2060 if( g.argc<4 ) usage("tokenizer porter|on|off|trigram");
2061 iOldTokenizer = search_tokenizer_type(0);
2062 db_set("search-tokenizer",
2063 search_tokenizer_for_string(g.argv[3]), 0);
2064 iNewTokenizer = search_tokenizer_type(1);
2065 if( iOldTokenizer!=iNewTokenizer ){
2066 /* Drop or rebuild index if tokenizer changes. */
2067 iAction = 1 + ((iOldTokenizer && iNewTokenizer)
2068 ? 1 : (iNewTokenizer ? 1 : 0));
2069 }
2070 }
 
 
 
 
 
2071
2072 /* destroy or rebuild the index, if requested */
2073 if( iAction>=1 ){
2074 search_drop_index();
2075 }
@@ -1986,12 +2080,12 @@
2080 /* Always show the status before ending */
2081 for(i=0; i<count(aSetng); i++){
2082 fossil_print("%-17s %s\n", aSetng[i].zName,
2083 db_get_boolean(aSetng[i].zSetting,0) ? "on" : "off");
2084 }
2085 fossil_print("%-17s %s\n", "tokenizer:",
2086 search_tokenizer_for_string(0));
2087 if( search_index_exists() ){
2088 fossil_print("%-17s FTS%d\n", "full-text index:", search_index_type(1));
2089 fossil_print("%-17s %d\n", "documents:",
2090 db_int(0, "SELECT count(*) FROM ftsdocs"));
2091 }else{
2092
+19 -2
--- src/setup.c
+++ src/setup.c
@@ -2005,10 +2005,25 @@
20052005
@ <p><a href="admin_log?n=%d(limit)&x=%d(limit+ofst)">[Older]</a></p>
20062006
}
20072007
style_finish_page();
20082008
}
20092009
2010
+
2011
+/*
2012
+** Renders a selection list of values for the search-tokenizer
2013
+** setting, using the form field name "ftstok".
2014
+*/
2015
+static void select_fts_tokenizer(void){
2016
+ const char *const aTokenizer[] = {
2017
+ "off", "None",
2018
+ "porter", "Porter Stemmer",
2019
+ "trigram", "Trigram"
2020
+ };
2021
+ multiple_choice_attribute("FTS Tokenizer", "search-tokenizer",
2022
+ "ftstok", "off", 3, aTokenizer);
2023
+}
2024
+
20102025
/*
20112026
** WEBPAGE: srchsetup
20122027
**
20132028
** Configure the search engine. Requires Admin privilege.
20142029
*/
@@ -2063,28 +2078,30 @@
20632078
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
20642079
@ <hr />
20652080
if( P("fts0") ){
20662081
search_drop_index();
20672082
}else if( P("fts1") ){
2083
+ const char *zTokenizer = PD("ftstok","off");
2084
+ search_set_tokenizer(zTokenizer);
20682085
search_drop_index();
20692086
search_create_index();
20702087
search_fill_index();
20712088
search_update_index(search_restrict(SRCH_ALL));
20722089
}
20732090
if( search_index_exists() ){
20742091
@ <p>Currently using an SQLite FTS%d(search_index_type(0)) search index.
20752092
@ The index helps search run faster, especially on large repositories,
20762093
@ but takes up space.</p>
2077
- onoff_attribute("Use Porter Stemmer","search-stemmer","ss",0,0);
2094
+ select_fts_tokenizer();
20782095
@ <p><input type="submit" name="fts0" value="Delete The Full-Text Index">
20792096
@ <input type="submit" name="fts1" value="Rebuild The Full-Text Index">
20802097
style_submenu_element("FTS Index Debugging","%R/test-ftsdocs");
20812098
}else{
20822099
@ <p>The SQLite search index is disabled. All searching will be
20832100
@ a full-text scan. This usually works fine, but can be slow for
20842101
@ larger repositories.</p>
2085
- onoff_attribute("Use Porter Stemmer","search-stemmer","ss",0,0);
2102
+ select_fts_tokenizer();
20862103
@ <p><input type="submit" name="fts1" value="Create A Full-Text Index">
20872104
}
20882105
@ </div></form>
20892106
style_finish_page();
20902107
}
20912108
--- src/setup.c
+++ src/setup.c
@@ -2005,10 +2005,25 @@
2005 @ <p><a href="admin_log?n=%d(limit)&x=%d(limit+ofst)">[Older]</a></p>
2006 }
2007 style_finish_page();
2008 }
2009
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2010 /*
2011 ** WEBPAGE: srchsetup
2012 **
2013 ** Configure the search engine. Requires Admin privilege.
2014 */
@@ -2063,28 +2078,30 @@
2063 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
2064 @ <hr />
2065 if( P("fts0") ){
2066 search_drop_index();
2067 }else if( P("fts1") ){
 
 
2068 search_drop_index();
2069 search_create_index();
2070 search_fill_index();
2071 search_update_index(search_restrict(SRCH_ALL));
2072 }
2073 if( search_index_exists() ){
2074 @ <p>Currently using an SQLite FTS%d(search_index_type(0)) search index.
2075 @ The index helps search run faster, especially on large repositories,
2076 @ but takes up space.</p>
2077 onoff_attribute("Use Porter Stemmer","search-stemmer","ss",0,0);
2078 @ <p><input type="submit" name="fts0" value="Delete The Full-Text Index">
2079 @ <input type="submit" name="fts1" value="Rebuild The Full-Text Index">
2080 style_submenu_element("FTS Index Debugging","%R/test-ftsdocs");
2081 }else{
2082 @ <p>The SQLite search index is disabled. All searching will be
2083 @ a full-text scan. This usually works fine, but can be slow for
2084 @ larger repositories.</p>
2085 onoff_attribute("Use Porter Stemmer","search-stemmer","ss",0,0);
2086 @ <p><input type="submit" name="fts1" value="Create A Full-Text Index">
2087 }
2088 @ </div></form>
2089 style_finish_page();
2090 }
2091
--- src/setup.c
+++ src/setup.c
@@ -2005,10 +2005,25 @@
2005 @ <p><a href="admin_log?n=%d(limit)&x=%d(limit+ofst)">[Older]</a></p>
2006 }
2007 style_finish_page();
2008 }
2009
2010
2011 /*
2012 ** Renders a selection list of values for the search-tokenizer
2013 ** setting, using the form field name "ftstok".
2014 */
2015 static void select_fts_tokenizer(void){
2016 const char *const aTokenizer[] = {
2017 "off", "None",
2018 "porter", "Porter Stemmer",
2019 "trigram", "Trigram"
2020 };
2021 multiple_choice_attribute("FTS Tokenizer", "search-tokenizer",
2022 "ftstok", "off", 3, aTokenizer);
2023 }
2024
2025 /*
2026 ** WEBPAGE: srchsetup
2027 **
2028 ** Configure the search engine. Requires Admin privilege.
2029 */
@@ -2063,28 +2078,30 @@
2078 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
2079 @ <hr />
2080 if( P("fts0") ){
2081 search_drop_index();
2082 }else if( P("fts1") ){
2083 const char *zTokenizer = PD("ftstok","off");
2084 search_set_tokenizer(zTokenizer);
2085 search_drop_index();
2086 search_create_index();
2087 search_fill_index();
2088 search_update_index(search_restrict(SRCH_ALL));
2089 }
2090 if( search_index_exists() ){
2091 @ <p>Currently using an SQLite FTS%d(search_index_type(0)) search index.
2092 @ The index helps search run faster, especially on large repositories,
2093 @ but takes up space.</p>
2094 select_fts_tokenizer();
2095 @ <p><input type="submit" name="fts0" value="Delete The Full-Text Index">
2096 @ <input type="submit" name="fts1" value="Rebuild The Full-Text Index">
2097 style_submenu_element("FTS Index Debugging","%R/test-ftsdocs");
2098 }else{
2099 @ <p>The SQLite search index is disabled. All searching will be
2100 @ a full-text scan. This usually works fine, but can be slow for
2101 @ larger repositories.</p>
2102 select_fts_tokenizer();
2103 @ <p><input type="submit" name="fts1" value="Create A Full-Text Index">
2104 }
2105 @ </div></form>
2106 style_finish_page();
2107 }
2108
+18 -16
--- www/changes.wiki
+++ www/changes.wiki
@@ -4,10 +4,12 @@
44
* The stock OCI container no longer includes BusyBox, thus no longer
55
needs to start as root to chroot that power away. That in turn
66
frees us from needing to build and install the container as root,
77
since it no longer has to create a private <tt>/dev</tt> tree
88
inside the jail for Fossil's use.
9
+ * Add support for the trigram tokenizer for FTS5 search to enable
10
+ searching in Chinese.
911
1012
<h2 id='v2_21'>Changes for version 2.21 (2023-02-25)</h2>
1113
* Users can request a password reset. This feature is disabledby default. Use
1214
the new [/help?cmd=self-pw-reset|self-pw-reset property] to enable it.
1315
New web pages [/help?cmd=/resetpw|/resetpw] and
@@ -64,17 +66,17 @@
6466
numeric order even if they contain a different number of digits.
6567
(Example: "fossil_80_..." comes before "fossil_100.png" in the
6668
[/dir?ci=92fd091703a28c07&name=skins/blitz|/skins/blitz] directory listing.)
6769
* Enhancements to the graph layout algorithm design to improve readability
6870
and promote better situational awareness.
69
- * Performance enhancement for the
71
+ * Performance enhancement for the
7072
[./checkin_names.wiki#root|"root:BRANCHNAME" style of tag],
7173
accomplished using a Common Table Expression in the underlying SQL.
7274
* Sort tag listings (command line and webpage) by taking numbers into
7375
consideration so as to cater for tags that follow semantic versioning.
7476
* On the wiki listings, omit by default wiki pages that are associated with
75
- check-ins and branches.
77
+ check-ins and branches.
7678
* Add the new "[/help?cmd=describe|fossil describe]" command.
7779
* Markdown subsystem extended with [../src/markdown.md#ftnts|footnotes support].
7880
See corresponding [../test/markdown-test3.md|test cases],
7981
[/wiki?name=branch/markdown-footnotes#il|known limitations] and
8082
[forum:/forumthread/ee1f1597e46ec07a|discussion].
@@ -123,11 +125,11 @@
123125
</ul>
124126
* Promote the test-detach command into the [/help?cmd=detach|detach command].
125127
* For "[/help?cmd=pull|fossil pull]" with the --from-parent-project option,
126128
if no URL is specified then use the last URL from the most recent prior
127129
"fossil pull --from-parent-project".
128
- * Add options --project-name and --project-desc to the
130
+ * Add options --project-name and --project-desc to the
129131
"[/help?cmd=init|fossil init]" command.
130132
* The [/help?cmd=/ext|/ext page] generates the SERVER_SOFTWARE environment
131133
variable for clients.
132134
* Fix the REQUEST_URI [/doc/trunk/www/aboutcgi.wiki#cgivar|CGI variable] such
133135
that it includes the query string. This is how most other systems understand
@@ -145,20 +147,20 @@
145147
<li> Performance improvements
146148
</ul>
147149
* The --branchcolor option on [/help?cmd=commit|fossil commit] and
148150
[/help?cmd=amend|fossil amend] can now take the value "auto" to
149151
force Fossil to use its built-in automatic color choosing algorithm.
150
- * Fossil now [./concepts.wiki#workflow|autosyncs] prior to running
152
+ * Fossil now [./concepts.wiki#workflow|autosyncs] prior to running
151153
[/help?cmd=open|fossil open].
152154
* Add the [/help?cmd=ticket-default-report|ticket-default-report setting],
153155
which if set to the title of a ticket report causes that ticket report
154156
to be displayed below the search box in the /ticket page.
155157
* The "nc" query parameter to the [/help?cmd=/timeline|/timeline] page
156158
causes all graph coloring to be omitted.
157159
* Improvements and bug fixes to the new "[/help?cmd=ui|fossil ui REMOTE]"
158160
feature so that it works better on a wider variety of platforms.
159
- * In [/help?cmd=/wikiedit|/wikiedit], show the list of attachments for
161
+ * In [/help?cmd=/wikiedit|/wikiedit], show the list of attachments for
160162
the current page and list URLs suitable for pasting them into the page.
161163
* Add the --no-http-compression option to [/help?cmd=sync|fossil sync]
162164
and similar.
163165
* Print total payload bytes on a [/help?cmd=sync|fossil sync] when using
164166
the --verbose option.
@@ -249,11 +251,11 @@
249251
* The [./defcsp.md|default CSP] has been relaxed slightly to allow
250252
images to be loaded from any URL. All other resources are still
251253
locked down by default.
252254
* The built-in skins all use the "[/help?cmd=mainmenu|mainmenu]"
253255
setting to determine the content of the main menu.
254
- The ability to edit the
256
+ The ability to edit the
255257
"mainmenu" setting is added on the /Admin/Configuration page.
256258
* The hamburger menu is now available on most of the built-in skins.
257259
* Any built-in skin named "X" can be used instead of the standard
258260
repository skin by adding the URL parameter <tt>skin=X</tt> to the
259261
request. The selection is persisted using the display
@@ -264,43 +266,43 @@
264266
/sitemap, so that it appears in hamburger menus.
265267
* The [/sitemap] extensions are now specified by a single new
266268
"[/help?cmd=sitemap-extra|sitemap-extra setting]",
267269
rather than a cluster of various
268270
"sitemap-*" settings. The older settings are no longer used.
269
- <b>This change might require minor server configuration
271
+ <b>This change might require minor server configuration
270272
adjustments on servers that use /sitemap extensions.</b>
271273
The /Admin/Configuration page provides the ability to edit
272274
the new "sitemap-extra" setting.
273
- * Added the "--ckout-alias NAME" option to
275
+ * Added the "--ckout-alias NAME" option to
274276
[/help?cmd=ui|fossil ui], [/help?cmd=server|fossil server], and
275277
[/help?cmd=http|fossil http]. This option causes Fossil to
276278
understand URIs of the form "/doc/NAME/..." as if they were
277279
"[/help?cmd=/doc|/doc/ckout/...]", to facilitate testing of
278280
[./embeddeddoc.wiki|embedded documentation] changes prior to
279281
check-in.
280282
* For diff web pages, if the diff type (unified versus side-by-side)
281
- is not specified by a query parameter, and if the
283
+ is not specified by a query parameter, and if the
282284
"[/help?cmd=preferred-diff-type|preferred-diff-type]"
283285
setting is omitted or less than 1, then select the diff type based
284286
on a guess of whether or not the request is coming from a mobile
285287
device. Mobile gets unified and desktop gets side-by-side.
286288
* The various pages which show diffs now have toggles to show/hide
287289
individual diffs.
288290
* Add the "[/help?cmd=preferred-diff-type|preferred-diff-type]"
289291
setting to allow an admin to force a default diff type.
290
- * The "pikchr-background" settings is now available in
292
+ * The "pikchr-background" settings is now available in
291293
"detail.txt" skin files, for better control of Pikchr
292294
colors in inverted color schemes.
293
- * Add the <tt>--list</tt> option to the
295
+ * Add the <tt>--list</tt> option to the
294296
[/help?cmd=tarball|tarball],
295297
[/help?cmd=zip|zip], and [/help?cmd=sqlar|sqlar]
296298
commands.
297299
* The javascript used to implement the hamburger menu on the
298300
default built-in skin has been made generic so that it is usable
299301
by a variety of skins, and promoted to an ordinary built-in
300302
javascript file.
301
- * New TH1 commands:
303
+ * New TH1 commands:
302304
"[/doc/trunk/www/th1.md#bireqjs|builtin_request_js]",
303305
"[/doc/trunk/www/th1.md#capexpr|capexpr]",
304306
"foreach", "lappend", and "string match"
305307
* The [/help/leaves|leaves command] now shows the branch point
306308
of each leaf.
@@ -333,11 +335,11 @@
333335
* <b>Schema Update Notice #1:</b>
334336
This release drops a trigger from the database schema (replacing
335337
it with a TEMP trigger that is created as needed). This
336338
change happens automatically the first time you
337339
add content to a repository using Fossil 2.14 or later. No
338
- action is needed on your part. However, if you upgrade to
340
+ action is needed on your part. However, if you upgrade to
339341
version 2.14 and then later downgrade or otherwise use an earlier
340342
version of Fossil, the email notification mechanism may fail
341343
to send out notifications for some events, due to the missing
342344
trigger. If you want to
343345
permanently downgrade an installation, then you should run
@@ -358,11 +360,11 @@
358360
from the remote URL and the newly cloned repo is opened. This makes
359361
the clone command work more like Git, thus making it easier for
360362
people transitioning from Git.
361363
* Added the --mainbranch option to the [/help?cmd=git|fossil git export]
362364
command.
363
- * Added the --format option to the
365
+ * Added the --format option to the
364366
"[/help?cmd=timeline|fossil timeline]" command.
365367
* Enhance the --numstat option on the
366368
"[/help?cmd=diff|fossil diff]" command so that it shows a total
367369
number of lines added and deleted and total number of files
368370
modified.
@@ -480,11 +482,11 @@
480482
of the checkin that occured on 2020-06-27 15:06 going back to
481483
the 2.11 release.
482484
* Update the built-in SQLite so that the
483485
"[/help?cmd=sql|fossil sql]" command supports new output
484486
modes ".mode box" and ".mode json".
485
- * Add the "<tt>obscure()</tt>" SQL function to the
487
+ * Add the "<tt>obscure()</tt>" SQL function to the
486488
"[/help?cmd=sql|fossil sql]" command.
487489
* Added virtual tables "<tt>helptext</tt>" and "<tt>builtin</tt>" to
488490
the "[/help?cmd=sql|fossil sql]" command, providing access to the
489491
dispatch table including all help text, and the builtin data files,
490492
respectively.
@@ -517,11 +519,11 @@
517519
to work without the rebuild, but the new backlinks will be missing.</ul>
518520
* The algorithm for finding the
519521
[./tech_overview.wiki#configloc|location of the configuration database]
520522
is enhanced to be XDG-compliant.
521523
* Add a hide/show feature to
522
- [./wikitheory.wiki#assocwiki|associated wiki] display on
524
+ [./wikitheory.wiki#assocwiki|associated wiki] display on
523525
check-in and branch information pages.
524526
* Enhance the "[/help?cmd=info|fossil info]" command so that it
525527
works with no arguments even if not within an open check-out.
526528
* Many improvements to the forum and especially email notification
527529
of forum posts, in response to community feedback after switching
528530
--- www/changes.wiki
+++ www/changes.wiki
@@ -4,10 +4,12 @@
4 * The stock OCI container no longer includes BusyBox, thus no longer
5 needs to start as root to chroot that power away. That in turn
6 frees us from needing to build and install the container as root,
7 since it no longer has to create a private <tt>/dev</tt> tree
8 inside the jail for Fossil's use.
 
 
9
10 <h2 id='v2_21'>Changes for version 2.21 (2023-02-25)</h2>
11 * Users can request a password reset. This feature is disabledby default. Use
12 the new [/help?cmd=self-pw-reset|self-pw-reset property] to enable it.
13 New web pages [/help?cmd=/resetpw|/resetpw] and
@@ -64,17 +66,17 @@
64 numeric order even if they contain a different number of digits.
65 (Example: "fossil_80_..." comes before "fossil_100.png" in the
66 [/dir?ci=92fd091703a28c07&name=skins/blitz|/skins/blitz] directory listing.)
67 * Enhancements to the graph layout algorithm design to improve readability
68 and promote better situational awareness.
69 * Performance enhancement for the
70 [./checkin_names.wiki#root|"root:BRANCHNAME" style of tag],
71 accomplished using a Common Table Expression in the underlying SQL.
72 * Sort tag listings (command line and webpage) by taking numbers into
73 consideration so as to cater for tags that follow semantic versioning.
74 * On the wiki listings, omit by default wiki pages that are associated with
75 check-ins and branches.
76 * Add the new "[/help?cmd=describe|fossil describe]" command.
77 * Markdown subsystem extended with [../src/markdown.md#ftnts|footnotes support].
78 See corresponding [../test/markdown-test3.md|test cases],
79 [/wiki?name=branch/markdown-footnotes#il|known limitations] and
80 [forum:/forumthread/ee1f1597e46ec07a|discussion].
@@ -123,11 +125,11 @@
123 </ul>
124 * Promote the test-detach command into the [/help?cmd=detach|detach command].
125 * For "[/help?cmd=pull|fossil pull]" with the --from-parent-project option,
126 if no URL is specified then use the last URL from the most recent prior
127 "fossil pull --from-parent-project".
128 * Add options --project-name and --project-desc to the
129 "[/help?cmd=init|fossil init]" command.
130 * The [/help?cmd=/ext|/ext page] generates the SERVER_SOFTWARE environment
131 variable for clients.
132 * Fix the REQUEST_URI [/doc/trunk/www/aboutcgi.wiki#cgivar|CGI variable] such
133 that it includes the query string. This is how most other systems understand
@@ -145,20 +147,20 @@
145 <li> Performance improvements
146 </ul>
147 * The --branchcolor option on [/help?cmd=commit|fossil commit] and
148 [/help?cmd=amend|fossil amend] can now take the value "auto" to
149 force Fossil to use its built-in automatic color choosing algorithm.
150 * Fossil now [./concepts.wiki#workflow|autosyncs] prior to running
151 [/help?cmd=open|fossil open].
152 * Add the [/help?cmd=ticket-default-report|ticket-default-report setting],
153 which if set to the title of a ticket report causes that ticket report
154 to be displayed below the search box in the /ticket page.
155 * The "nc" query parameter to the [/help?cmd=/timeline|/timeline] page
156 causes all graph coloring to be omitted.
157 * Improvements and bug fixes to the new "[/help?cmd=ui|fossil ui REMOTE]"
158 feature so that it works better on a wider variety of platforms.
159 * In [/help?cmd=/wikiedit|/wikiedit], show the list of attachments for
160 the current page and list URLs suitable for pasting them into the page.
161 * Add the --no-http-compression option to [/help?cmd=sync|fossil sync]
162 and similar.
163 * Print total payload bytes on a [/help?cmd=sync|fossil sync] when using
164 the --verbose option.
@@ -249,11 +251,11 @@
249 * The [./defcsp.md|default CSP] has been relaxed slightly to allow
250 images to be loaded from any URL. All other resources are still
251 locked down by default.
252 * The built-in skins all use the "[/help?cmd=mainmenu|mainmenu]"
253 setting to determine the content of the main menu.
254 The ability to edit the
255 "mainmenu" setting is added on the /Admin/Configuration page.
256 * The hamburger menu is now available on most of the built-in skins.
257 * Any built-in skin named "X" can be used instead of the standard
258 repository skin by adding the URL parameter <tt>skin=X</tt> to the
259 request. The selection is persisted using the display
@@ -264,43 +266,43 @@
264 /sitemap, so that it appears in hamburger menus.
265 * The [/sitemap] extensions are now specified by a single new
266 "[/help?cmd=sitemap-extra|sitemap-extra setting]",
267 rather than a cluster of various
268 "sitemap-*" settings. The older settings are no longer used.
269 <b>This change might require minor server configuration
270 adjustments on servers that use /sitemap extensions.</b>
271 The /Admin/Configuration page provides the ability to edit
272 the new "sitemap-extra" setting.
273 * Added the "--ckout-alias NAME" option to
274 [/help?cmd=ui|fossil ui], [/help?cmd=server|fossil server], and
275 [/help?cmd=http|fossil http]. This option causes Fossil to
276 understand URIs of the form "/doc/NAME/..." as if they were
277 "[/help?cmd=/doc|/doc/ckout/...]", to facilitate testing of
278 [./embeddeddoc.wiki|embedded documentation] changes prior to
279 check-in.
280 * For diff web pages, if the diff type (unified versus side-by-side)
281 is not specified by a query parameter, and if the
282 "[/help?cmd=preferred-diff-type|preferred-diff-type]"
283 setting is omitted or less than 1, then select the diff type based
284 on a guess of whether or not the request is coming from a mobile
285 device. Mobile gets unified and desktop gets side-by-side.
286 * The various pages which show diffs now have toggles to show/hide
287 individual diffs.
288 * Add the "[/help?cmd=preferred-diff-type|preferred-diff-type]"
289 setting to allow an admin to force a default diff type.
290 * The "pikchr-background" settings is now available in
291 "detail.txt" skin files, for better control of Pikchr
292 colors in inverted color schemes.
293 * Add the <tt>--list</tt> option to the
294 [/help?cmd=tarball|tarball],
295 [/help?cmd=zip|zip], and [/help?cmd=sqlar|sqlar]
296 commands.
297 * The javascript used to implement the hamburger menu on the
298 default built-in skin has been made generic so that it is usable
299 by a variety of skins, and promoted to an ordinary built-in
300 javascript file.
301 * New TH1 commands:
302 "[/doc/trunk/www/th1.md#bireqjs|builtin_request_js]",
303 "[/doc/trunk/www/th1.md#capexpr|capexpr]",
304 "foreach", "lappend", and "string match"
305 * The [/help/leaves|leaves command] now shows the branch point
306 of each leaf.
@@ -333,11 +335,11 @@
333 * <b>Schema Update Notice #1:</b>
334 This release drops a trigger from the database schema (replacing
335 it with a TEMP trigger that is created as needed). This
336 change happens automatically the first time you
337 add content to a repository using Fossil 2.14 or later. No
338 action is needed on your part. However, if you upgrade to
339 version 2.14 and then later downgrade or otherwise use an earlier
340 version of Fossil, the email notification mechanism may fail
341 to send out notifications for some events, due to the missing
342 trigger. If you want to
343 permanently downgrade an installation, then you should run
@@ -358,11 +360,11 @@
358 from the remote URL and the newly cloned repo is opened. This makes
359 the clone command work more like Git, thus making it easier for
360 people transitioning from Git.
361 * Added the --mainbranch option to the [/help?cmd=git|fossil git export]
362 command.
363 * Added the --format option to the
364 "[/help?cmd=timeline|fossil timeline]" command.
365 * Enhance the --numstat option on the
366 "[/help?cmd=diff|fossil diff]" command so that it shows a total
367 number of lines added and deleted and total number of files
368 modified.
@@ -480,11 +482,11 @@
480 of the checkin that occured on 2020-06-27 15:06 going back to
481 the 2.11 release.
482 * Update the built-in SQLite so that the
483 "[/help?cmd=sql|fossil sql]" command supports new output
484 modes ".mode box" and ".mode json".
485 * Add the "<tt>obscure()</tt>" SQL function to the
486 "[/help?cmd=sql|fossil sql]" command.
487 * Added virtual tables "<tt>helptext</tt>" and "<tt>builtin</tt>" to
488 the "[/help?cmd=sql|fossil sql]" command, providing access to the
489 dispatch table including all help text, and the builtin data files,
490 respectively.
@@ -517,11 +519,11 @@
517 to work without the rebuild, but the new backlinks will be missing.</ul>
518 * The algorithm for finding the
519 [./tech_overview.wiki#configloc|location of the configuration database]
520 is enhanced to be XDG-compliant.
521 * Add a hide/show feature to
522 [./wikitheory.wiki#assocwiki|associated wiki] display on
523 check-in and branch information pages.
524 * Enhance the "[/help?cmd=info|fossil info]" command so that it
525 works with no arguments even if not within an open check-out.
526 * Many improvements to the forum and especially email notification
527 of forum posts, in response to community feedback after switching
528
--- www/changes.wiki
+++ www/changes.wiki
@@ -4,10 +4,12 @@
4 * The stock OCI container no longer includes BusyBox, thus no longer
5 needs to start as root to chroot that power away. That in turn
6 frees us from needing to build and install the container as root,
7 since it no longer has to create a private <tt>/dev</tt> tree
8 inside the jail for Fossil's use.
9 * Add support for the trigram tokenizer for FTS5 search to enable
10 searching in Chinese.
11
12 <h2 id='v2_21'>Changes for version 2.21 (2023-02-25)</h2>
13 * Users can request a password reset. This feature is disabledby default. Use
14 the new [/help?cmd=self-pw-reset|self-pw-reset property] to enable it.
15 New web pages [/help?cmd=/resetpw|/resetpw] and
@@ -64,17 +66,17 @@
66 numeric order even if they contain a different number of digits.
67 (Example: "fossil_80_..." comes before "fossil_100.png" in the
68 [/dir?ci=92fd091703a28c07&name=skins/blitz|/skins/blitz] directory listing.)
69 * Enhancements to the graph layout algorithm design to improve readability
70 and promote better situational awareness.
71 * Performance enhancement for the
72 [./checkin_names.wiki#root|"root:BRANCHNAME" style of tag],
73 accomplished using a Common Table Expression in the underlying SQL.
74 * Sort tag listings (command line and webpage) by taking numbers into
75 consideration so as to cater for tags that follow semantic versioning.
76 * On the wiki listings, omit by default wiki pages that are associated with
77 check-ins and branches.
78 * Add the new "[/help?cmd=describe|fossil describe]" command.
79 * Markdown subsystem extended with [../src/markdown.md#ftnts|footnotes support].
80 See corresponding [../test/markdown-test3.md|test cases],
81 [/wiki?name=branch/markdown-footnotes#il|known limitations] and
82 [forum:/forumthread/ee1f1597e46ec07a|discussion].
@@ -123,11 +125,11 @@
125 </ul>
126 * Promote the test-detach command into the [/help?cmd=detach|detach command].
127 * For "[/help?cmd=pull|fossil pull]" with the --from-parent-project option,
128 if no URL is specified then use the last URL from the most recent prior
129 "fossil pull --from-parent-project".
130 * Add options --project-name and --project-desc to the
131 "[/help?cmd=init|fossil init]" command.
132 * The [/help?cmd=/ext|/ext page] generates the SERVER_SOFTWARE environment
133 variable for clients.
134 * Fix the REQUEST_URI [/doc/trunk/www/aboutcgi.wiki#cgivar|CGI variable] such
135 that it includes the query string. This is how most other systems understand
@@ -145,20 +147,20 @@
147 <li> Performance improvements
148 </ul>
149 * The --branchcolor option on [/help?cmd=commit|fossil commit] and
150 [/help?cmd=amend|fossil amend] can now take the value "auto" to
151 force Fossil to use its built-in automatic color choosing algorithm.
152 * Fossil now [./concepts.wiki#workflow|autosyncs] prior to running
153 [/help?cmd=open|fossil open].
154 * Add the [/help?cmd=ticket-default-report|ticket-default-report setting],
155 which if set to the title of a ticket report causes that ticket report
156 to be displayed below the search box in the /ticket page.
157 * The "nc" query parameter to the [/help?cmd=/timeline|/timeline] page
158 causes all graph coloring to be omitted.
159 * Improvements and bug fixes to the new "[/help?cmd=ui|fossil ui REMOTE]"
160 feature so that it works better on a wider variety of platforms.
161 * In [/help?cmd=/wikiedit|/wikiedit], show the list of attachments for
162 the current page and list URLs suitable for pasting them into the page.
163 * Add the --no-http-compression option to [/help?cmd=sync|fossil sync]
164 and similar.
165 * Print total payload bytes on a [/help?cmd=sync|fossil sync] when using
166 the --verbose option.
@@ -249,11 +251,11 @@
251 * The [./defcsp.md|default CSP] has been relaxed slightly to allow
252 images to be loaded from any URL. All other resources are still
253 locked down by default.
254 * The built-in skins all use the "[/help?cmd=mainmenu|mainmenu]"
255 setting to determine the content of the main menu.
256 The ability to edit the
257 "mainmenu" setting is added on the /Admin/Configuration page.
258 * The hamburger menu is now available on most of the built-in skins.
259 * Any built-in skin named "X" can be used instead of the standard
260 repository skin by adding the URL parameter <tt>skin=X</tt> to the
261 request. The selection is persisted using the display
@@ -264,43 +266,43 @@
266 /sitemap, so that it appears in hamburger menus.
267 * The [/sitemap] extensions are now specified by a single new
268 "[/help?cmd=sitemap-extra|sitemap-extra setting]",
269 rather than a cluster of various
270 "sitemap-*" settings. The older settings are no longer used.
271 <b>This change might require minor server configuration
272 adjustments on servers that use /sitemap extensions.</b>
273 The /Admin/Configuration page provides the ability to edit
274 the new "sitemap-extra" setting.
275 * Added the "--ckout-alias NAME" option to
276 [/help?cmd=ui|fossil ui], [/help?cmd=server|fossil server], and
277 [/help?cmd=http|fossil http]. This option causes Fossil to
278 understand URIs of the form "/doc/NAME/..." as if they were
279 "[/help?cmd=/doc|/doc/ckout/...]", to facilitate testing of
280 [./embeddeddoc.wiki|embedded documentation] changes prior to
281 check-in.
282 * For diff web pages, if the diff type (unified versus side-by-side)
283 is not specified by a query parameter, and if the
284 "[/help?cmd=preferred-diff-type|preferred-diff-type]"
285 setting is omitted or less than 1, then select the diff type based
286 on a guess of whether or not the request is coming from a mobile
287 device. Mobile gets unified and desktop gets side-by-side.
288 * The various pages which show diffs now have toggles to show/hide
289 individual diffs.
290 * Add the "[/help?cmd=preferred-diff-type|preferred-diff-type]"
291 setting to allow an admin to force a default diff type.
292 * The "pikchr-background" settings is now available in
293 "detail.txt" skin files, for better control of Pikchr
294 colors in inverted color schemes.
295 * Add the <tt>--list</tt> option to the
296 [/help?cmd=tarball|tarball],
297 [/help?cmd=zip|zip], and [/help?cmd=sqlar|sqlar]
298 commands.
299 * The javascript used to implement the hamburger menu on the
300 default built-in skin has been made generic so that it is usable
301 by a variety of skins, and promoted to an ordinary built-in
302 javascript file.
303 * New TH1 commands:
304 "[/doc/trunk/www/th1.md#bireqjs|builtin_request_js]",
305 "[/doc/trunk/www/th1.md#capexpr|capexpr]",
306 "foreach", "lappend", and "string match"
307 * The [/help/leaves|leaves command] now shows the branch point
308 of each leaf.
@@ -333,11 +335,11 @@
335 * <b>Schema Update Notice #1:</b>
336 This release drops a trigger from the database schema (replacing
337 it with a TEMP trigger that is created as needed). This
338 change happens automatically the first time you
339 add content to a repository using Fossil 2.14 or later. No
340 action is needed on your part. However, if you upgrade to
341 version 2.14 and then later downgrade or otherwise use an earlier
342 version of Fossil, the email notification mechanism may fail
343 to send out notifications for some events, due to the missing
344 trigger. If you want to
345 permanently downgrade an installation, then you should run
@@ -358,11 +360,11 @@
360 from the remote URL and the newly cloned repo is opened. This makes
361 the clone command work more like Git, thus making it easier for
362 people transitioning from Git.
363 * Added the --mainbranch option to the [/help?cmd=git|fossil git export]
364 command.
365 * Added the --format option to the
366 "[/help?cmd=timeline|fossil timeline]" command.
367 * Enhance the --numstat option on the
368 "[/help?cmd=diff|fossil diff]" command so that it shows a total
369 number of lines added and deleted and total number of files
370 modified.
@@ -480,11 +482,11 @@
482 of the checkin that occured on 2020-06-27 15:06 going back to
483 the 2.11 release.
484 * Update the built-in SQLite so that the
485 "[/help?cmd=sql|fossil sql]" command supports new output
486 modes ".mode box" and ".mode json".
487 * Add the "<tt>obscure()</tt>" SQL function to the
488 "[/help?cmd=sql|fossil sql]" command.
489 * Added virtual tables "<tt>helptext</tt>" and "<tt>builtin</tt>" to
490 the "[/help?cmd=sql|fossil sql]" command, providing access to the
491 dispatch table including all help text, and the builtin data files,
492 respectively.
@@ -517,11 +519,11 @@
519 to work without the rebuild, but the new backlinks will be missing.</ul>
520 * The algorithm for finding the
521 [./tech_overview.wiki#configloc|location of the configuration database]
522 is enhanced to be XDG-compliant.
523 * Add a hide/show feature to
524 [./wikitheory.wiki#assocwiki|associated wiki] display on
525 check-in and branch information pages.
526 * Enhance the "[/help?cmd=info|fossil info]" command so that it
527 works with no arguments even if not within an open check-out.
528 * Many improvements to the forum and especially email notification
529 of forum posts, in response to community feedback after switching
530

Keyboard Shortcuts

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