Scoring by field value

Is it possible to score documents by a field value? Or weigh the results by one? I have a situation where I have a field “document_type” and some types need to get higher relevance scores than others. How could I accomplish this? For example document type “event” should have twice as big relevance than “contact”.

You’d use the optional operator, e.g. “(~@document_type:event => {$weight: 100}) (~@document_type:contact => {$weight: 50})"