Page MenuHomePhabricator

[BUG] The same 2 articles displayed twice on search results
Closed, ResolvedPublic


Steps to reproduce

  1. Search for Bishop McDevitt
  2. wait for article suggestions to load

Expected results

Each article are only listed once

Actual results

The top 2 articles are listed twice


Environments observed

App version: 908.1
OS versions: iOS 9.3.3
Device model: iPad mini 1
Device language: English

Event Timeline

Josve05a created this task.Aug 12 2016, 1:35 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 12 2016, 1:35 AM
Josve05a renamed this task from [BUG] The same 2 artikel displays twice on search results to [BUG] The same 2 articles displays twice on search results.Aug 12 2016, 1:36 AM
Josve05a updated the task description. (Show Details)Aug 12 2016, 1:40 AM
Danny_B renamed this task from [BUG] The same 2 articles displays twice on search results to [BUG] The same 2 articles displayed twice on search results.Aug 12 2016, 2:51 AM
JMinor triaged this task as Low priority.Aug 17 2016, 12:53 AM
JMinor added a project: iOS-app-v5.2.0-Honey.
JMinor moved this task from Needs Triage to Bug Backlog on the Wikipedia-iOS-App-Backlog board.
Mhurd added a subscriber: Mhurd.Aug 18 2016, 5:44 PM

guessing if we remove the now largely redundant secondary full text search this issue will go away.

Josve05a moved this task from Backlog to iOS App on the User-Josve05a board.Aug 23 2016, 11:38 AM
julbod claimed this task.Mar 15 2017, 12:39 PM
julbod added a comment.EditedMar 16 2017, 12:48 PM

When merging the previous results with the secondary full text search results, duplicates objects are deleted (objects that already are in the previous results). But this does not work.

The following function from WMFSearchResults checks for duplicates based on containsObject which always returns false:

- (void)mergeResultsFromModel:(WMFSearchResults *)searchResults {
    NSArray *newResults = [searchResults.results wmf_reject:^BOOL(MWKSearchResult *obj) {
        return [self.results containsObject:obj];
    [self.mutableResults addObjectsFromArray:newResults];

Found another search term that produce this bug: "Universite de Sherbrooke" in en wiki.

julbod removed julbod as the assignee of this task.Apr 19 2017, 2:33 AM
julbod added a subscriber: julbod.
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 20 2017, 7:06 PM
This comment was removed by NHarateh_WMF.

Tested Wikipedia app 5.4.1 (1124) on iPhone 6S (iOS 10.3.1) and iPhone 7 (iOS 10.3.2), according to the screencaps below this is not fixed yet.

ABorbaWMF added a subscriber: ABorbaWMF.

Tested on an iPhone 7+ with iOS 10.3 and an iPad Mini 2 Retina on Beta App 5.5.0 (1129)

This is fixed. Tried a few different search terms that returned multiple similar results (as in the example above). Results were not duplicated.

JMinor closed this task as Resolved.May 23 2017, 8:48 PM
JMinor added a subscriber: JMinor.

Thanks @NHarateh_WMF !!!