The current recommendation for doing this is to use the 'bq' parameter with function queries.
Use of function queries is described here: https://cwiki.apache.org/confluence/display/solr/Function+Queries
But note that the examples there suggest using 'bf', but we recommend using 'bq' instead. This is mainly due to the fact that the query parser won't handle whitespace coming through 'bf' correctly. Specifically, using this will generate an error:
But this will work as expected:
More on the "deprecation" (sort of) of bf at: