If i add the sorting logic it is executing with each result not the overall search results. I need to sort on overall search results with a specific field. where can i do that ?
To add a sort to your search request, assign the setSortaction on your SearchProvider instance to the field you wish to sort on. It does not matter that you are using a custom ResultsView , results will be sorted before rendering. Does this answer your question, or are you looking to reorder the fields within an individual result card?
we want to implement some custom sorting on one of the field.
ex: const siteStatuses = result.actual_status? result.actual_status.raw:[];
This siteStatuses is one of the array of strings like ["Completed", "Accruing", "Closed", "open"].
Now we want to sort the results, such that all open status are top then Accruing then completed like so. something like this custom order ["Open", "Accruing", "Completed", "Closed"]
This is effecting the relevance now. previously without adding the sort, the relevance data would be top but now it is not. is this because of the sort changes ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.