Autocomplete Feedback

Use this API when a user hits an autocomplete suggestion.
GET /api/v1/{project}/collections/{collection}/autocomplete/feedback/hits
POST /api/v1/{project}/collections/{collection}/autocomplete/feedback/hits
GET /api/v1/{project}/collections/{collection}/autocomplete/{handler}/feedback/hits
POST /api/v1/{project}/collections/{collection}/autocomplete/{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 autocomplete handler, set it to suggest if you have not created your own custom search handler.

Querystring parameters (Body if POST):

  1. query: the search query, e.x ?query=lableb.
  2. item_id: the id of the clicked suggestion if the suggestion type is navigational, e.x ?item_id=1.
  3. item_order: the index of the clicked suggestion starting from 1, e.x ?item_order=2.
  4. url: the url of the clicked suggestion, e.x ?url=http://mysite.com/posts/clicked-document.
  5. session_id: a unique identifier for a user session, e.x ?session_id=1xHsxW342.
  6. user_id: a unique identifier for a user, e.x ?user_id=1.
  7. user_ip: user ip address, e.x ?user_ip=
  8. user_country: user country code, e.x ?user_country=DE.

Example request:


Example response:

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