Commit 1f774db4 authored by Robert Knight's avatar Robert Knight

Remove "result" field handling from viewFilter service

This was undocumented and untested, and it is very unlikely that anyone
actually uses it.

It has also fundamentally been broken for a long time in the client
because filtering was applied _before_ sorting when building the thread
structure, so it was arbitrary (from the user's point of view) which
annotations would be kept by a `result` limit.
parent ad486887
......@@ -139,11 +139,6 @@ function viewFilter(unicode) {
* @return {string[]} IDs of matching annotations.
*/
this.filter = (annotations, filters) => {
var limit = annotations.length;
if (filters.result) {
limit = Math.min(...filters.result.terms.map(parseInt));
}
// Convert the input filter object into a filter tree, expanding "any"
// filters.
var fieldFilters = Object.entries(filters).filter(([, filter]) =>
......@@ -166,7 +161,6 @@ function viewFilter(unicode) {
return annotations
.filter(ann => rootFilter.matches(ann))
.slice(0, limit)
.map(ann => ann.id);
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment