Results per page setting in search form

neochief - November 9, 2008 - 00:40
Project:Sphinx search
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

I found that sphinxsearch form isn't provide ability to choose "Results per page" in advanced search form. This functionality is pretty important in large-scaled sites, so I've added it to the form. I linked it's default value to value which could be set at global administration of this module. Also, I removed some useless options from it's combo-box. I'm sure that "10, 20, 30, 50, 100" (like in Google's form) is better than old value.

Please review the patch. (And thanks for previous commits ;)

AttachmentSize
sphinxsearch.results_per_page.patch3.33 KB

#1

neochief - November 9, 2008 - 13:46

Fixed assert warning of sphinxsearchapi on int check:
$search_options['results_per_page'] = (int)$search_options['results_per_page'];

(wonder why it triggered, but anyway, the warning gone)

AttachmentSize
sphinxsearch.results_per_page.patch 3.41 KB

#2

markus_petrux - November 9, 2008 - 14:16
Status:needs review» needs work

Please, check out the list of TODO things that need to be done for the D6 version of this module:

http://drupal.org/node/306959#comment-1007276

Once hook_sphinxsearch_api() is done and working, I plan to add the ability to create profiles (or something similar) to build search page options. To do that, I'll probably move options that are now in the module settings panel to the "profile edit panel", there I could include an option to customize the number of results per page, which options are available for advanced search form, predefined filters, what should be available for faceted search block, etc.

I just need time to keep working on that... I hope to get into it next week, but it depends on daily job.

PS: Flagging the issue as "needs work", but it really depends on things that I still need to code.

 
 

Drupal is a registered trademark of Dries Buytaert.