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.
Commit
13d93e404a2d65c4da7a94de8f48e18ca3491774
Parent
0b3464cf727e565…
1 file changed
+2
-1
+2
-1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -2213,16 +2213,17 @@ | ||
| 2213 | 2213 | search_drop_index(); |
| 2214 | 2214 | }else if( P("fts1") ){ |
| 2215 | 2215 | search_drop_index(); |
| 2216 | 2216 | search_create_index(); |
| 2217 | 2217 | search_fill_index(); |
| 2218 | - search_update_index(SRCH_ALL); | |
| 2218 | + search_update_index(search_restrict(SRCH_ALL)); | |
| 2219 | 2219 | } |
| 2220 | 2220 | if( search_index_exists() ){ |
| 2221 | 2221 | @ <p>Currently using an SQLite FTS4 search index. This makes search |
| 2222 | 2222 | @ run faster, especially on large repositories, but takes up space.</p> |
| 2223 | 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"> | |
| 2224 | 2225 | }else{ |
| 2225 | 2226 | @ <p>The SQLite FTS4 search index is disabled. All searching will be |
| 2226 | 2227 | @ a full-text scan. This usually works fine, but can be slow for |
| 2227 | 2228 | @ larger repositories.</p> |
| 2228 | 2229 | @ <p><input type="submit" name="fts1" value="Create A Full-Text Index"> |
| 2229 | 2230 |
| --- 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 |