It's is possible. I can see 3 options.
- Use bq param or boost with function query
- Use BoostQueryParser as on example
- Apply boost in index time. You can use this option with update handler or DIH
In some cases I'm using either option 1 (to add boost based on date field) in other 3 (to apply a "document class" wide boost)
Options 1 and 3 are the easiest to store in config. 1 in search handler config, 3 in dataimport/update handler config