I don’t have much direct experience with using field values in relevance calculations, but it can be done. Here are some starting points, and perhaps others can offer advice backed by more experience.
You can use the DismaxParams section of searchspecs.yaml to send extra parameters to Solr’s Dismax query parser. You can then use the Dismax “bf” (boost function) parameter to boost results using a function:
The disadvantage to using “bf” is that it only works with Solr’s Dismax handler… which VuFind uses most of the time, but not always – advanced searches (those with special operators like wildcards, or anything coming from the “Advanced Search” page) use the older Lucene-syntax handler and will ignore the bf setting.
You can use the “_val_” special field to include functions in non-DisMax queries…. though I don’t think VuFind has a simple way to support this natively. If you need it, we might be able to figure something out, though!
A lot of the complexity of working with function queries involves figuring out the math to get your boost to have the right level of impact – you don’t want to have too much or too little effect on the results. There is a whole chapter discussing this in more detail in this book:
There are also more details here, though in a much less reader-friendly form:
You might also be able to get some general advice on the solr-user mailing list: