Page MenuHomePhabricator

More Like feature broken in es 2.x
Closed, ResolvedPublic

Description

Scenario: Searching for morelike:<page> returns pages that are "like" that page # features/more_like_api.feature:7
  When I api search for morelike:More Like Me 1                                 # features/step_definitions/search_steps.rb:30
  Then More Like Me is in the first api search result                           # features/step_definitions/search_steps.rb:312
    undefined method `include?' for nil:NilClass (NoMethodError)
Scenario: Searching for morelike:<redirect> returns pages that are "like" the page that it is a redirect to # features/more_like_api.feature:12
  When I api search for morelike:More Like Me Rdir                                                          # features/step_definitions/search_steps.rb:30
  Then More Like Me is in the first api search result                                                       # features/step_definitions/search_steps.rb:312
    undefined method `include?' for nil:NilClass (NoMethodError)
Scenario: Searching for morelike:<page>|<page>|<page> returns pages that are "like" all those pages # features/more_like_api.feature:22
  When I api search for morelike:More Like Me 1|More Like Me Set 2 Page 1|More Like Me Set 3 Page 1 # features/step_definitions/search_steps.rb:30
  Then More Like Me is part of the api search result                                                # features/step_definitions/search_steps.rb:387
Scenario: Searching for morelike:<page> with the title field and filtering with the word length               # features/more_like_this_options.feature:7
  When I set More Like This Options to title field, word length to 3 and I search for morelike:More Like Me 1 # features/step_definitions/search_steps.rb:199
  Then More Like Me 2 is in the search results                                                                # features/step_definitions/search_steps.rb:384
Scenario: Searching for morelike:<page> with the title field and filtering with the percent terms to match                 # features/more_like_this_options.feature:17
  When I set More Like This Options to title field, percent terms to match to 0.7 and I search for morelike:More Like Me 1 # features/step_definitions/search_steps.rb:204
  Then More Like Me 2 is in the search results                                                                             # features/step_definitions/search_steps.rb:384
Scenario: Searching for morelike:<page> with the title field and settings with poor precision                 # features/more_like_this_options.feature:31
  When I set More Like This Options to title field, word length to 1 and I search for morelike:More Like Me 1 # features/step_definitions/search_steps.rb:199
  Then ChangeMe is in the search results                                                                      # features/step_definitions/search_steps.rb:384

Pretty much all more like tests except the ones that check for no results return no results, which the test flags as an error. There is one patch already up for more like in es 2.x. Chances are it's wrong: https://gerrit.wikimedia.org/r/#/c/284918/8/includes/Searcher.php

Examples:

Event Timeline

Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptApr 26 2016, 10:42 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
EBernhardson updated the task description. (Show Details)

Change 284918 had a related patch set uploaded (by EBernhardson):
MoreLikeThis percent_terms_to_match -> minimum_should_match

https://gerrit.wikimedia.org/r/284918

Change 284918 merged by jenkins-bot:
MoreLikeThis percent_terms_to_match -> minimum_should_match

https://gerrit.wikimedia.org/r/284918

Deskana closed this task as Resolved.May 11 2016, 10:36 PM
Deskana triaged this task as Normal priority.