Implement fall-back function to give recommendations when Input Document is not in DB
Joeran opened this issue · 0 comments
Joeran commented
Let's say, a user calls https://api.mr-dlib.org/v1/documents/fes-bib-254998/related_documents but the document fes-bib-254998 does not exist in our DB/Solr Index, then it would be nice if we could return recommendations anyway. I see two options
a)
- We allow users to send a document's title in the URL, e.g. https://api.mr-dlib.org/v1/documents/fes-bib-254998;Gemeinsame%20Lösung%20anstreben/related_documents
- If we do not have the document in our database, we use the title to search Solr, and then return the search results as recommendations
b)
- If the input document is not in our DB, we return 0 recommendations
- Our user can then manually search for related documents by performing a classic search, e.g. https://api.mr-dlib.org/v1/search?q=Gemeinsame%20Lösung%20anstreben