Hello ,
I need to sort items that matched having same score by a date field .
This an example of the query
"sort" : [
"_score",
{ "searchDate" : {"order" : "desc" } }
]
This works perfectly .
Now i want to convert this to java code and here is my code :
querySourceBuilder.sort("_score", SortOrder.DESC).sort(SEARCH_DATE_FIELD,SortOrder.DESC);
but it's sorting all only by date .