How to increase number of results for the drupal search
Hi all. I have a site and a client that want to increase the number of items that search function returns: from 10 to 20. How can I do it ? Tnx. -- Michel 'ZioBudda' Morelli michel@ziobuddalabs.net Sviluppo applicazioni CMS DRUPAL e web dinamiche (LAMP+Ajax) Telefono: 0200619074 Telefono Cell: +39-3939890025 -- Fax: +39-0291390660 http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ziodrupal.net MSN: michel@ziobuddalabs.it JABBER: michel@ziobuddalabs.it
On Mon, 28 Dec 2009 16:45:34 +0100 Michel Morelli <michel@ziobuddalabs.it> wrote:
Hi all. I have a site and a client that want to increase the number of items that search function returns: from 10 to 20.
How can I do it ?
It looks as it is hardcoded in do_search() $result = pager_query("$select $sort_parameters", 10, 0, $count_select, $arguments); You could write a hook_search cloning node_search and tweak where needed. You're going to spend more time patching your cloned version of node_search every time there is a new node.module rather than hacking core... unless you plan to actually maintain your own search routines and not just copy and paste node_search. Maybe there is somewhere an issue about configuring # of returned results... patch core adding an interface to that setting and maybe you'll see it accepted... I'd be curious how long does it take to get an idea about how much it's worth to pursue this path in certain circumstances... -- Ivan Sergio Borgonovo http://www.webthatworks.it
Ivan Sergio Borgonovo ha scritto:
It looks as it is hardcoded in do_search()
Hi. Yes, I had see it.
You could write a hook_search cloning node_search and tweak where needed.
[SNIP] Ok, the reply to the customer will be "No, it is impossible for the moment".
Tnx Ivan for the reply. M. -- Michel 'ZioBudda' Morelli michel@ziobuddalabs.net Sviluppo applicazioni CMS DRUPAL e web dinamiche (LAMP+Ajax) Telefono: 0200619074 Telefono Cell: +39-3939890025 -- Fax: +39-0291390660 http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ziodrupal.net MSN: michel@ziobuddalabs.it JABBER: michel@ziobuddalabs.it
participants (2)
-
Ivan Sergio Borgonovo -
Michel Morelli