Develop a MediaWiki extension that makes the citolytics recommendations accessible via API. A stand-alone extension is not feasible. Thus, integrate Citolytics query to CirrusSearch extension. Additional query prefix (`citolytics:Pagetitle`) should be most suitable.
**Requirements**
- API response format must be the same as in CirrusSearch ([[ https://en.wikipedia.org/w/api.php?action=query&prop=pageterms|pageimages|pageprops&ppprop=mainpage|disambiguation&wbptterms=description&generator=search&gsrsearch=morelike:Mars&gsrnamespace=0&gsrwhat=text&gsrinfo=&gsrprop=redirecttitle&gsrlimit=10&piprop=thumbnail&pithumbsize=100&pilimit=2 | example ]])
- Recommendations are provided as CSV/JSON file and stored in HDFS
- ...
**Issues & Questions**
- What database/index technology can we use for recommendation retrieval? Can we read directly from the CSV or would it be too inefficient? -> ElasticSearch is used.
- Article description and thumbnails are not provided by Citolytics -> Solved by pageimages+wikidata extension
**Approach**
- Create CirrusSearch\Query\CitolyticsFeature (see MoreLikeFeature)
- Use CitolyticsResultType for result representation
- Integrate CitolyticsFeature to Searcher
-------
```
# Example response
{
"continue": {
"picontinue": 453326,
"continue": "||pageterms|pageprops"
},
"query": {
"pages": {
"9228": {
"pageid": 9228,
"ns": 0,
"title": "Earth",
"index": 10,
"terms": {
"description": [
"Third planet closest to the Sun in the Solar System"
]
},
"thumbnail": {
"source": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/97/The_Earth_seen_from_Apollo_17.jpg/100px-The_Earth_seen_from_Apollo_17.jpg",
"width": 100,
"height": 100
}
}
```