Search results sorting

1. Terms contained within the Label (H1)
2. Terms contained within the Meta Description
3. Terms contained within the H2
4. Terms contained within the H3
5. Body Text
Ugly JavaScript? :)