We have 3 funnelback searches on our site: Business Finder; Course Finder; Job Finder
The first 2 will display all the available results when the page is initially navigated to, however the Job finder only returns result when a query is entered.
Is there a setting to fire a blank search that I need to turn on?
Firing a 'blank' or 'null' query is intended to 'show all results'.
Simply showing all results has its own issues, though:
How will they be sorted? Date? Title? Size?
How will the query summary message be displayed? "You searched for XXX."?
What should be logged by the search analytics system?
Once you've attempted to answer those questions for yourself, enabling support for null queries is reasonably straightforward.
If you're using the deprecated Classic UI, you can add the following to collection.cfg:
ui.null_query_enabled=true
If you're using the Modern UI, two hook scripts will be required:
hook_pre_process.groovy:
// Fix to enable ui.null_query_enabled functionality
if (transaction.question.query == null) {
// query must be set to something or padre isn't called _ is stripped out by padre when processing the query
transaction.question.query = "_"
transaction.question.originalQuery = "_"
// set the system query value to run a null query
transaction.question.additionalParameters["s"] = ["!padrenull"]
}
hook_post_process.groovy:
// Allow the modern UI to handle an undefined queryCleaned value (will occur for the above code as s params aren't included in queryClean)
if ( transaction.response != null && transaction.response.resultPacket.queryCleaned == null)
{
transaction.response.resultPacket.queryCleaned ="";
}
I'm not entirely sure if we are using the Modern UI. We've got Funnelback 13.0 and Matrix 4.14.0.
We already have the search page in place that handles the results with regard to results per page, sort order and filtering.
We just want all the results to be returned to the user when they navigate to the search page, in the same way that out other 2 funnelback searched work.
If you're using Funnelback 13.0, you'll probably be using the Modern UI by default (although support for the Classic UI is still available in that version).
I believe that the -nulqok query processor option is deprecated (only intended for use by the Classic UI). It's use should be discouraged in favour of the hook script workaround, and I'll see if the reference can't be removed from the documentation site.