Short circuit empty searches user/dbs/avoid_empty_searches
authorDan Scott <dscott@laurentian.ca>
Mon, 24 Jun 2013 15:41:32 +0000 (11:41 -0400)
committerDan Scott <dscott@laurentian.ca>
Mon, 24 Jun 2013 15:54:36 +0000 (11:54 -0400)
commitc5d12656aa80a09928b3b7dd8deed6f886d56cfa
treebb81bb0c923da3e73f7113a7bf3870d8b178c7be
parent52f893edbec7b71a2e9c40afb1cd5a7c2cc1cc9b
Short circuit empty searches

If we have no search terms, we shouldn't kick off a search. Accordingly,
track whether we have, in fact, any type + value combos where value is
not an empty string, or a non-empty original query, and return
immediately if we have nothing to search.

Compare the results of the following opensrf call before and after:

request open-ils.search open-ils.search.biblio.multiclass.query {}
"title: "

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm