It ensures that matches on the top-level resource item (content or discussion) is worth a lot more when sorting than matches on messages / comments. This part didn't change though, these line changes are just a change in indentation due to some refactoring.