My view based on Search API is giving me duplicate results. I get duplicate results if I use the following things in combination:
- A pager
- A sort of any kind. e.g. Sort by ascending integers, sort by descending select field etc.
Sometimes I get a couple duplicate results, other times entire pages are identical.
According to the module page I should be able to use view sorts on single valued indexed fields, but I can't seem to get this to work at all.
Has anyone else run into this? How did you solve it?
Common solutions for duplicate results
Most of the solutions I've spotted for this involve options which don't appear for Search API. They usually involve adding aggregation or distinct filters in the Views options.
The possible solution here fails. The problem is it searches for duplicate results only amongst the current page of the view.
i.e. if I get 60 nodes on a search with a pager of 15, this splits into 4 pages. If the duplicates are on pages 1 & 3 then they're not spotted.