I've been thinking lately about the way VuFind gives special recommendations for authors based on an author search.  This is a useful feature, but the way it is implemented has always felt too special-casey to me.  When the SearchObject code introduced "top facets," things got even messier.


I've just done a bit of code refactoring in an effort to clean this up -- I've separated out the author recommendations and top facet code into separate classes and templates and created a generic, configurable "recommendations" infrastructure that allows a different plug-in to be used for each search type.  There is now a standard interface for creating new "recommendations modules" that have access to the SearchObject (so they can extract information about the current search) and can receive additional configuration parameters through the .ini files (for a little extra flexibility).


This probably isn't 100% clear without taking a look at it -- see r2033 for all the changes, and see this Wiki page for a general overview:




I think there are a lot of possibilities for creative plug-ins, though, and I plan on exploring this some more in the coming months.  In the meantime, if anyone has any objections or suggestions with regard to the class interface, configuration options, or anything else, I'm happy to hear them.  What I've done seems flexible enough for the current applications, but I'm sure it could be improved upon.


(Side note:  Today's my last day at work before Villanova closes for holiday break, so I won't be doing any more coding until the new year; however, I will still be checking emails every day or two, so don't let my vacation stop you from commenting!)