mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-23 07:27:02 +00:00
Use Comparator.comparingDouble().
This commit is contained in:
parent
059cfcbad2
commit
d1f3f15478
@ -31,7 +31,7 @@ public class PreferenceFuzzySearchFunction
|
|||||||
// Specific search - Used for determining order of search results
|
// Specific search - Used for determining order of search results
|
||||||
// Calculate a score based on specific search fields
|
// Calculate a score based on specific search fields
|
||||||
.map(item -> new FuzzySearchSpecificDTO(item, keyword))
|
.map(item -> new FuzzySearchSpecificDTO(item, keyword))
|
||||||
.sorted(Comparator.comparing(FuzzySearchSpecificDTO::getScore).reversed())
|
.sorted(Comparator.comparingDouble(FuzzySearchSpecificDTO::getScore).reversed())
|
||||||
.map(FuzzySearchSpecificDTO::getItem)
|
.map(FuzzySearchSpecificDTO::getItem)
|
||||||
// Limit the amount of search results
|
// Limit the amount of search results
|
||||||
.limit(20);
|
.limit(20);
|
||||||
|
Loading…
Reference in New Issue
Block a user