Sorting Results by Collection

Hello, I am quite new to Algolia and have some basic programming knowledge, but for some reason I cannot figure out how to sort my search results by their collection. The search feature is for different dog paintings, and all the products are categorized by their collection (i.e. contemporary, abstract, traditional, etc.). How can I rank all search results by their collection so that contemporary results are first, then abstract 2nd, and so on? I need to basically order my search results by their collection.

If you just want the results alphabetical by collection, you could just collection as a custom ranking attribute. If you want to sort collections in a specific order, you could includes an additional numeric collection attribute and sort on that.