Sure it is possible, but it depends on your set-up. For ex.:
You can create a custom field "mysearchsort" make it "indexible" for your page types.
Order smart search results by "mysearchsort".
If is a good practice to use luke (lucene index tool box) - to see what is inside your index. You might want to use fields which already exists, instead of creating your own.
In transformation when you render search results you can save mysearchsort in RequestStockObject. On each iteration you check it and if your current mysearchsort is different from the one you saved in RequestStockObject you render you category title "Category X:"