I hope you are doing fine. I want to sort my search results according to a particular attribute.
I just wanted to verify if my approach is fine:
filterState[or: "groupName"].add(Filter.Facet(attribute: "challengeId", stringValue: challengeObject.id!)) sortByConnector = .init(searcher: participationIndexSearcher, indicesNames: ["rating"], selected: 0) sortByConnector.connect() participationIndexSearcher.connectFilterState(filterState) participationIndexSearcher.search()
I am not sure, if even sortByConnector.connect() is needed but to explain you my goal, I want to sort after the ranking attribute.
Thanks in advance!