Hi
When we compare results of our search via RelevantSort with standart search results - there are differences in sorting order
There is a piece of code we use to search for Confluence items with RelevantSort
SearchSort sort = new RelevanceSort();
params.setSort(sort);
if (contributor != null) {
ConfluenceUser cuser = userAccessor.getUserByName(contributor);
if (cuser != null) {
params.setContributor(cuser);
}
}
timer.start("Search");
SearchFilter securityFilter = SiteSearchPermissionsSearchFilter.getInstance();
ResultFilter resultFilter = new SubsetResultFilter(startIndex, 10);
ISearch search = new Search(new InSpaceQuery(where), sort, securityFilter, resultFilter);
ISearch originSearch = predefinedSearchBuilder.buildSiteSearch(params, startIndex, MAX_RESULTS_PER_PAGE);
have you perhaps resolved or found the cause of this behaviour? I have a similar situation where I have a custom property to order by, but within that I also want to preserve the relevance sorting as the secondary order bay. I do that by using MultiSearchSort, but it doesn’t output the results in the correct order. Since my custom SearchSort is sorting by content types, it’s obvious the results are not sorted by relevance as they are by default, even though I am using RelevanceSort.
I also tried using only RelevanceSort as sort for my property (essentially ignoring my “order by” clause), and the same problem persists.