Fossil SCM

Add the "Rebuild Full-Text Index" button to the /srchsetup page. Only construct the full-text index for the documents types that are enabled.

drh 2015-02-03 13:27 trunk
Commit 13d93e404a2d65c4da7a94de8f48e18ca3491774
1 file changed +2 -1
+2 -1
--- src/setup.c
+++ src/setup.c
@@ -2213,16 +2213,17 @@
22132213
search_drop_index();
22142214
}else if( P("fts1") ){
22152215
search_drop_index();
22162216
search_create_index();
22172217
search_fill_index();
2218
- search_update_index(SRCH_ALL);
2218
+ search_update_index(search_restrict(SRCH_ALL));
22192219
}
22202220
if( search_index_exists() ){
22212221
@ <p>Currently using an SQLite FTS4 search index. This makes search
22222222
@ run faster, especially on large repositories, but takes up space.</p>
22232223
@ <p><input type="submit" name="fts0" value="Delete The Full-Text Index">
2224
+ @ <input type="submit" name="fts1" value="Rebuild The Full-Text Index">
22242225
}else{
22252226
@ <p>The SQLite FTS4 search index is disabled. All searching will be
22262227
@ a full-text scan. This usually works fine, but can be slow for
22272228
@ larger repositories.</p>
22282229
@ <p><input type="submit" name="fts1" value="Create A Full-Text Index">
22292230
--- src/setup.c
+++ src/setup.c
@@ -2213,16 +2213,17 @@
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
--- src/setup.c
+++ src/setup.c
@@ -2213,16 +2213,17 @@
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(search_restrict(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 @ <input type="submit" name="fts1" value="Rebuild The Full-Text Index">
2225 }else{
2226 @ <p>The SQLite FTS4 search index is disabled. All searching will be
2227 @ a full-text scan. This usually works fine, but can be slow for
2228 @ larger repositories.</p>
2229 @ <p><input type="submit" name="fts1" value="Create A Full-Text Index">
2230

Keyboard Shortcuts

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