Index: trac/htdocs/js/search.js
===================================================================
--- trac/htdocs/js/search.js	(revision 6820)
+++ trac/htdocs/js/search.js	(working copy)
@@ -39,7 +39,7 @@
           var terms = [];
           $.each(query.split(/(".*?")|('.*?')|(\s+)/), function() {
             term = this.replace(/^\s+$/, "");
-            if (term.length) {
+            if (terms.length < 25 && term.length) {
               terms.push(term.replace(/^['"]/, "").replace(/['"]$/, ""));
             }
           });
@@ -56,4 +56,4 @@
     });
   });
 
-})(jQuery);
\ No newline at end of file
+})(jQuery);

