Weighting based on a numeric field

Is it possible to weigh documents based on numeric field values? Such as (@post_date:[1633424984 1633511384] => {$weight: 10})? The query doesn’t throw an error, but the weight isn’t taken into account here. Should it work or not?