Patch for * only searches

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Patch for * only searches

Joel Timothy Norman, Mr

When a user types * as the only character in a search, solr returns an error.  Obviously, the user would like to see everything in the catalog.  Here is a simple fix.

In SOLR.php on line 207 before the foreach statement in buildQuery add this:

if(sizeof($search) == 1 && $search[0]['lookfor'] == "*"){
            return 'collection:Catalog';

That should return everything in the catalog.


Check out the new Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
Vufind-tech mailing list
[hidden email]