Added limit for search query

Change-Id: I62cd622cfd2f9d44f09648ec51932acdb54a3991
(cherry picked from commit c854531150)
This commit is contained in:
Yaron Koren 2018-05-03 17:41:30 +00:00 committed by Cicalese
parent 42748d0d6d
commit d5fc4b8655

View file

@ -35,9 +35,14 @@ class ReplaceTextSearch {
self::categoryCondition( $category, $tables, $conds );
self::prefixCondition( $prefix, $conds );
$sort = [ 'ORDER BY' => 'page_namespace, page_title' ];
$options = [
'ORDER BY' => 'page_namespace, page_title',
// 250 seems like a reasonable limit for one screen.
// @TODO - should probably be a setting.
'LIMIT' => 250
];
return $dbr->select( $tables, $vars, $conds, __METHOD__, $sort );
return $dbr->select( $tables, $vars, $conds, __METHOD__, $options );
}
/**