Silently drop unknown titles in completion search
authorErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 14 Dec 2017 01:03:20 +0000 (17:03 -0800)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 11 Jun 2018 20:56:19 +0000 (13:56 -0700)
commit83bae78c3a78a56eb4bcbabdb2cd0e1670af89a1
treebbc2541e57ceb4c4fb10063fd0b3b88423b194c2
parent2a43939ffb0cfb0808c2b56430be4f5e88d863ee
Silently drop unknown titles in completion search

This mimics how full text works by silenty dropping results returned from
search that no longer exist. This could be because the search index is slightly
out of sync with reality, or the search engine could simply be broken.

Only silent from the users perspective. We maintain a count in statsd of
the number of titles dropped. This can be monitored over time to
recognize any increases.

Bug: T115756
Change-Id: I2f29d73e258cd448a14d35a2b4902a4fb6f61c68
includes/search/SearchEngine.php
includes/search/SearchSuggestionSet.php
tests/phpunit/includes/api/ApiQueryPrefixSearchTest.php
tests/phpunit/includes/search/SearchEnginePrefixTest.php
tests/phpunit/includes/search/SearchEngineTest.php
tests/phpunit/mocks/search/MockCompletionSearchEngine.php
tests/phpunit/mocks/search/MockSearchEngine.php