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.