Increased inner search limit to 2500
authorAlexander Ebert <ebert@woltlab.com>
Thu, 7 May 2015 10:35:05 +0000 (12:35 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 7 May 2015 10:35:05 +0000 (12:35 +0200)
wcfsetup/install/files/lib/system/search/SearchEngine.class.php
wcfsetup/install/files/lib/system/search/mysql/MysqlSearchEngine.class.php

index f3a64ef232acb7bc87154b27acc4db0e05a9807f..5f3a52ac906337b9c962d10012a6ec816e4bd13d 100644 (file)
@@ -16,6 +16,12 @@ use wcf\system\SingletonFactory;
  * @category   Community Framework
  */
 class SearchEngine extends SingletonFactory implements ISearchEngine {
+       /**
+        * limit for inner search limits
+        * @var integer
+        */
+       const INNER_SEARCH_LIMIT = 2500;
+       
        /**
         * list of available object types
         * @var array
index 007e6ccf7ce13f46674e4a37b9c0a52ba5989f8b..9aeccc4932d4f494fc8e04f3a8985ac241927f87 100644 (file)
@@ -117,7 +117,7 @@ class MysqlSearchEngine extends AbstractSearchEngine {
                        WHERE           ".($fulltextCondition !== null ? $fulltextCondition : '')."
                                        ".(($searchIndexCondition !== null && $searchIndexCondition->__toString()) ? ($fulltextCondition !== null ? "AND " : '').$searchIndexCondition : '')."
                        ".(!empty($orderBy) && $fulltextCondition === null ? 'ORDER BY '.$orderBy : '')."
-                       LIMIT           1000";
+                       LIMIT           ".($limit == 1000 ? SearchEngine::INNER_SEARCH_LIMIT : $limit);
                
                return array(
                        'fulltextCondition' => $fulltextCondition,