Getting an error when using boost for multiple fields

Not sure I got the question but may be you want this? https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-script-score-query.html