Fossil SCM

Add a control to the /srchsetup page that allows the full-text index to be created and destroyed.

drh 2015-02-03 04:58 UTC indexed-fts
Commit ef78fba86a7fff99e0cfa80da6b75038c480efee
1 file changed +19
+19
--- src/setup.c
+++ src/setup.c
@@ -2206,8 +2206,27 @@
22062206
onoff_attribute("Search Tickets", "search-tkt", "st", 0, 0);
22072207
@ <br>
22082208
onoff_attribute("Search Wiki","search-wiki", "sw", 0, 0);
22092209
@ <hr/>
22102210
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
2211
+ @ <hr/>
2212
+ if( P("fts0") ){
2213
+ search_drop_index();
2214
+ }else if( P("fts1") ){
2215
+ search_drop_index();
2216
+ search_create_index();
2217
+ search_fill_index();
2218
+ search_update_index(SRCH_ALL);
2219
+ }
2220
+ if( search_index_exists() ){
2221
+ @ <p>Currently using an SQLite FTS4 search index. This makes search
2222
+ @ run faster, especially on large repositories, but takes up space.</p>
2223
+ @ <p><input type="submit" name="fts0" value="Delete The Full-Text Index">
2224
+ }else{
2225
+ @ <p>The SQLite FTS4 search index is disabled. All searching will be
2226
+ @ a full-text scan. This usually works fine, but can be slow for
2227
+ @ larger repositories.</p>
2228
+ @ <p><input type="submit" name="fts1" value="Create A Full-Text Index">
2229
+ }
22112230
@ </div></form>
22122231
style_footer();
22132232
}
22142233
--- src/setup.c
+++ src/setup.c
@@ -2206,8 +2206,27 @@
2206 onoff_attribute("Search Tickets", "search-tkt", "st", 0, 0);
2207 @ <br>
2208 onoff_attribute("Search Wiki","search-wiki", "sw", 0, 0);
2209 @ <hr/>
2210 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2211 @ </div></form>
2212 style_footer();
2213 }
2214
--- src/setup.c
+++ src/setup.c
@@ -2206,8 +2206,27 @@
2206 onoff_attribute("Search Tickets", "search-tkt", "st", 0, 0);
2207 @ <br>
2208 onoff_attribute("Search Wiki","search-wiki", "sw", 0, 0);
2209 @ <hr/>
2210 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
2211 @ <hr/>
2212 if( P("fts0") ){
2213 search_drop_index();
2214 }else if( P("fts1") ){
2215 search_drop_index();
2216 search_create_index();
2217 search_fill_index();
2218 search_update_index(SRCH_ALL);
2219 }
2220 if( search_index_exists() ){
2221 @ <p>Currently using an SQLite FTS4 search index. This makes search
2222 @ run faster, especially on large repositories, but takes up space.</p>
2223 @ <p><input type="submit" name="fts0" value="Delete The Full-Text Index">
2224 }else{
2225 @ <p>The SQLite FTS4 search index is disabled. All searching will be
2226 @ a full-text scan. This usually works fine, but can be slow for
2227 @ larger repositories.</p>
2228 @ <p><input type="submit" name="fts1" value="Create A Full-Text Index">
2229 }
2230 @ </div></form>
2231 style_footer();
2232 }
2233

Keyboard Shortcuts

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