Index: trunk/extensions/MWSearch/MWSearchUpdater.php |
— | — | @@ -84,6 +84,17 @@ |
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
| 88 | + * Request that the daemon flush and reopen all indexes, without changing |
| 89 | + * the global is-running state, and that indexes should be optimized when |
| 90 | + * closed. |
| 91 | + * @return bool |
| 92 | + * @static |
| 93 | + */ |
| 94 | + function optimize() { |
| 95 | + return MWSearchUpdater::sendRPC( 'searchupdater.optimize' ); |
| 96 | + } |
| 97 | + |
| 98 | + /** |
88 | 99 | * Request that the daemon flush and reopen a given index, without changing |
89 | 100 | * the global is-running state. |
90 | 101 | * @return bool |
Index: trunk/extensions/MWSearch/luceneUpdate.php |
— | — | @@ -35,6 +35,9 @@ |
36 | 36 | case 'quit': |
37 | 37 | $ret = MWSearchUpdater::quit(); |
38 | 38 | break; |
| 39 | +case 'optimize': |
| 40 | + $ret = MWSearchUpdater::optimize(); |
| 41 | + break; |
39 | 42 | case 'update': |
40 | 43 | $title = Title::newFromText( $args[1] ); |
41 | 44 | if( is_null( $title ) ) { |