Depending on which VuFind version you are working with, there are different strategies that might work for this:

 

1.)    In VuFind 1.x, it might be easiest to create a library-specific searchspecs.yaml file which includes boost queries for a particular library.  Then you can adjust web/sys/Solr.php to override the $searchSpecsFile property based on the current IP address in order to load the appropriate file.

2.)    In VuFind 2.0, you could set up separate configuration directories for each library, and each directory could contain an appropriately customized searchspecs.yaml file.  In your Apache configuration, you could determine which configuration directory is used based on IP address with the help of “SetEnvIf Remote_Addr” directives.

 

Overriding the searchspecs.yaml file is just one possible strategy, but it seems like a fairly simple place to start.  Let me know if you need more details on any of this, or if you’d prefer an alternate solution.

 

- Demian

 

From: Jon Singletary [mailto:jws2@andrew.cmu.edu]
Sent: Wednesday, November 28, 2012 2:30 PM
To: vufind-general@lists.sourceforge.net
Subject: [VuFind-General] Customizing search results by location

 

Hello,

 

I have two questions.  First, has anyone created different search behavior in VuFind for users from a specific IP address range?

 

Second, in a multi-library organization is there a way to make VuFind results from one library appear higher than those from other libraries?

 

I’m asking because we would like to provide different search results for one of our campuses, by pushing their books to the top of the results.   Users at other campuses would be unaffected, however.

 

Thanks for your help,

Jon

 

 

Jon Singletary, Library Systems Specialist,

Carnegie Mellon University,  jws2@andrew.cmu.edu