I wanted to know whether it is possible to sort queries by most relevant within a specified range.
For example, lets take three scores that have been returned by a query.
Doc 1 = 85.1 - Date = 2 March 2020
Doc 2 = 84.2 - Date = 9 March 2020
Doc 3 = 83.8 - Date = 1 March 2020
In this case, all the three are within a range of +1 to -1 of each other. Normally this will get returned in the order Doc 1, Doc 2, Doc 3. I want it to return as Doc 2, Doc 1, Doc 3.
How do I do that?
I know we can sort by date, but I want it only for a certain range(in this case -1 to +1).
Any help will be appreciated. Thanks!