Randomly pulls documents from Wikipedia, indexes them and provides a REST api for searching.
App setup:
pyenv install 3.7.4
mkvirtualenv wikisearch -p ~/.pyenv/versions/3.7.4/bin/python
workon wikisearch
pip install -r requirements.txt
python -m nltk.downloader stopwords
To run the app:
FLASK_ENV="development" FLASK_APP="app.py" flask run
To run the tests:
FLASK_ENV="testing" nosetests tests
Endpoints:
/api/search?q={search} Lists documents matching the search query (q) and with a relevancy score.
/api/docs Lists all documents.
/api/docs/{id} Returns a document with the given id.
/api/index Returns the status of the search index
Demo App An demo app for testing the search.