Hi, I need to create an endpoint for the Content Delivery API which searches the text content of various properties on a particular document type. Using the documentation (https://docs.umbraco.com/umbraco-cms/reference/content-delivery-api/extension-api-for-querying) I've built a custom indexer which concatenates the values of the relevant properties into a single new field in the index, and have also built a custom filter to return the results based on the presence of a search term. It works nicely. However, since this is just a filter it's effectively returning the results in the default order, with the items not containing the search term removed from the output.
I need to be able to sort the results like a normal Examine query would, such that a node containing lots of references to the search term will appear higher than one with fewer references.
Has anyone done anything like this with the Content Delivery API? What would be the simplest way of achieving this?