Funnel back search doesn't allow empty search query

Hi

 

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?

try setting your query parameter to be a null query.

 

eg.

query=!padrenullquery

Hi Aleks

 

Where do I put this?

Hi Cromers -

 

Firing a 'blank' or 'null' query is intended to 'show all results'. 

 

Simply showing all results has its own issues, though:

  1. How will they be sorted?  Date? Title? Size?
  2. How will the query summary message be displayed?  "You searched for XXX."?
  3. 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 ="";
}

See also: http://docs.funnelback.com/user_interface_hook_scripts.html

Hi Gordon

 

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.

It looks like Funnelback 13.0 does support it... http://docs.funnelback.com/13.0/user_interface_hook_scripts.html

Hi Cromers -

 

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).

 

See also:

http://docs.funnelback.com/user_interface.html

Old post I know, but it looks like there's an option in the query parameters as well:

 

nulqok: An empty query submitted via CGI will be processed as a null query. (dflt is to ignore the request). [Not CGI]

 

-- though I admit I've never used this.

Hi Tim -

 

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.

 

http://docs.funnelback.com/query_processor_options_collection_cfg.html#G.%20Query%20interpretation%20options