Recommendation Feedback

Use this API when a user clicks on a recommended document.
GET /api/v2/projects/{project}/collections/{collection}/recommend/feedback/hits
POST /api/v2/projects/{project}/collections/{collection}/recommend/feedback/hits
GET /api/v2/projects/{project}/collections/{collection}/recommend/{handler}/feedback/hits
POST /api/v2/projects/{project}/collections/{collection}/recommend/{handler}/feedback/hits
  1. {project} is your project name, e.x wptest.
  2. {collection} is the name of collection of documents you want to search in, e.x posts.
  3. {handler} is the recommender system handler, set it to default if you have not created your own custom search handler.

Querystring parameters (Body if POST):

  1. source_id: source document id, e.x ?source_id=1.
  2. source_title: source document title, e.x ?source_title=example title.
  3. source_url: source document url, e.x ?source_url=http://mysite.com/posts/example-title.
  4. target_id: target document id, e.x ?target_id=2.
  5. target_title: target document title, e.x ?target_title=target title.
  6. target_url: target document url, e.x ?target_url=http://mysite.com/posts/target-title.
  7. item_order: the index of the clicked recommendation starting from 1, e.x ?item_order=2.
  8. session_id: user session id, e.x ?session_id=xDijefr342xesdf.
  9. user_id: a unique identifier for a user, e.x ?user_id=1.
  10. user_ip: user ip address, e.x ?user_ip=
  11. user_country: user country code, e.x ?user_country=DE.

Example request:

  &source_title=example title
  &target_title=target title

Example response:

  "time": 6,
  "code": 200,
  "response": null