Page MenuHomePhabricator

Create a dedicated API endpoint for morelike queries
Open, MediumPublic


Currently morelike queries (used by mobile RelatedArticles) is using the CirrusSearch syntax.
This type of queries is one of the most heavily used keyword in cirrus.
Having morelike as part of the search syntax is interesting but should cover only the few usecases of searchers using the input box.
I think we should provide a dedicated API endpoint that does not rely on the CirrusSearch syntax so that heavy consumers have a stable API that is not dependent on the search syntax.

Work has been done to expose this API through RESTBase (T125983) but this is still using the syntax and is only used by the the mobile apps, mobile web directly call the action API with list=search (IIRC).

The benefits for us would be:

  • promote morelike to a first class API citizen and have more control over it
  • make the work on the search syntax parser easier (morelike is one the few greedy keyword we'd like to refactor), with a dedicated API endpoint we would not have to care about breaking an important API consumer (155M api requests/day)
  • make future work on switching the implementation behind easier.

Event Timeline

dcausse created this task.Jan 22 2018, 11:30 AM
Restricted Application added a project: Discovery. · View Herald TranscriptJan 22 2018, 11:30 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
EBjune triaged this task as Medium priority.Mar 1 2018, 6:28 PM
EBjune moved this task from needs triage to This Quarter on the Discovery-Search board.