mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
Remove refuse pile logic that in practice resulted in a lot fewer results showing up for many queries.
This commit is contained in:
parent
58fcddedbb
commit
c47eb25483
@ -181,7 +181,6 @@ public class IndexQueryService {
|
|||||||
params.queryParams);
|
params.queryParams);
|
||||||
|
|
||||||
ArrayList<EdgeSearchResultItem> items = new ArrayList<>(results.size());
|
ArrayList<EdgeSearchResultItem> items = new ArrayList<>(results.size());
|
||||||
ArrayList<EdgeSearchResultItem> refusedItems = new ArrayList<>(results.size());
|
|
||||||
|
|
||||||
// Sorting the result ids results in better paging characteristics
|
// Sorting the result ids results in better paging characteristics
|
||||||
results.sort();
|
results.sort();
|
||||||
@ -189,21 +188,11 @@ public class IndexQueryService {
|
|||||||
results.forEach(id -> {
|
results.forEach(id -> {
|
||||||
var item = evaluator.evaluateResult(id);
|
var item = evaluator.evaluateResult(id);
|
||||||
|
|
||||||
// Score value is zero when the best params variant consists of low-value terms that are just scattered
|
items.add(item);
|
||||||
// throughout the document, with no indicators of importance associated with them.
|
|
||||||
if (item.getScoreValue() < 0) {
|
|
||||||
items.add(item);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
refusedItems.add(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (items.isEmpty()) {
|
|
||||||
items.addAll(refusedItems);
|
|
||||||
}
|
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user