Quantcast

Patch for * only searches

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

Patch for * only searches

Joel Timothy Norman, Mr
Hi,


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.


-Joel


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Loading...