tags:

views:

487

answers:

2

I'm working on a Drupal 5.x book-selling site and using the Views Fast Search module. In the search results, the client wants the user to be able to choose (from a select box) from a variety of displays, e.g.: sort by bestselling book, sort by word count, sort by most recently added, etc.

Some of these are straightforward but others require a more complicated query. For instance, the client wants bestselling view to take into account a number of variables, so it has to join together several tables, do calculations involving several variables, etc. In short, it's nothing I have been able to do via the view configuration in the Drupal admin interface.

The other part of my problem is that we have overridden the default pagination so it needs to use the themed version. But this module doesn't work with that version because if (a) I set it to be paginated with x number of results per page, it returns x as the count (not the overall total number of results), messing up the count query, or (b) if I disable pagination, it never gets to the themed pagination routine.

So my questions are: how do I define the complicated query I've described in the code (assuming I can't do via the module configuration interface)? And how do I make it use my themed pagination?

Thanks.

A: 

Sounds to me like you'd be better off with a custom module. It sounds daunting, but I really think it would save you time if you're decent at PHP.

Here's the master link for D5: http://api.drupal.org/api/group/search/5

Have you ever done a custom module before?

Mike Crittenden
Thanks. Yes, I've worked on custom modules ... we were just hoping to make use of the speed of the particular Views Fast Search module. If we drop that, we can use regular Drupal search to get the job done.
Dan U.
The custom route is how we ended up solving it.
Dan U.
A: 

Have you had a look at the apache solr module. You'll have to set up the solr service (or pay a third party), but it give you a great deal of power of what/how to search and how to display the results.

Jeremy French