stella-project / stella-app

Multi-container application of the STELLA infrastructure
GNU General Public License v3.0
2 stars 1 forks source link

the endpoint datasets?itemid=x&rid=y&sid=z gibt immer ein Ranking mit new rid zurück #31

Closed narges1212 closed 3 years ago

narges1212 commented 3 years ago

To prepare the feedback I need to send again a get request to stella-app to get the ranking with specific ranking_id, however I got always a ranking with new rankig_id. the session id and item_id are returned correctly.

breuert commented 3 years ago

If a session-identifier is provided, the same systems should be queried in order to return consistent results to site users within a specific session. Currently, we do not cache the rankings/recommendations. In fact, this will result in a new request of the experimental system which consequently leads to a new rid.

breuert commented 3 years ago

The idea is to make a new database entry for each ranking and recommendation even if they contain the same items. Each time we display results to users, their interaction and thus the logged feedback can be different. Long story short: it is intended to return a new rid.

breuert commented 3 years ago

Btw: the endpoint datasets?itemid=<string>&sid=<int> does not offer the option to pass a rid. Maybe this has caused the confusion!?!

breuert commented 3 years ago

Hi Narges, please have a look at this commit. I've added an endpoint to retrieve older rankings and recommendations with the help of rid. The corresponding endpoints are:

/recommendation/datasets/<int:rid>
/recommendation/publications/<int:rid>
/ranking/<int:rid>

Please tell me, if the formatting of the output is okay!

Thx!

breuert commented 3 years ago

When testing, please have a look at the unit test I've added in this commit

narges1212 commented 3 years ago

1- /recommendation/datasets/ 2- /recommendation/publications/ 3- /ranking/

all return the same result, which is correct, but I am not sure about the difference btw 1 .. 3 the returned json contains always "feedback_id"=null (what is the usage of feedback_id?)

breuert commented 3 years ago

This means, there has not been feedback data provided yet.

narges1212 commented 3 years ago

ok, for now all returns same result. tested! done