Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

Add search suggestions. #29

Closed
s3rius opened this issue Nov 27, 2018 · 1 comment
Closed

Add search suggestions. #29

s3rius opened this issue Nov 27, 2018 · 1 comment
Assignees
Labels
functionality Features that must be implemented.

Comments

@s3rius
Copy link
Owner

s3rius commented Nov 27, 2018

Add REST API for search suggestions.
Best implementation will be:

  1. Frontend sends you a request with search query.
  2. Backend returns possible suggestions with suggested item type.
    As example:
    Sent by frontend:
{
  "query": "pe"
}

Backend response:

[
  {
    "suggest": "pepperoni",
    "type": "Order item"
  },
  {
    "suggest": "Peaks Island",
    "type": "Seller"
  }
]
@s3rius s3rius added the functionality Features that must be implemented. label Nov 27, 2018
Kolaer added a commit that referenced this issue Nov 28, 2018
Made some progress on #29

Signed-off-by: Kolaer <overlordin777@gmail.com>
Kolaer added a commit that referenced this issue Nov 28, 2018
Progress on #29.

Signed-off-by: Kolaer <overlordin777@gmail.com>
Kolaer added a commit that referenced this issue Nov 28, 2018
Progress on #29.

Signed-off-by: Kolaer <overlordin777@gmail.com>
@Kolaer
Copy link
Collaborator

Kolaer commented Nov 28, 2018

Added simple search API at /search_api/search.

Parameters:

  • query: string. String to query to.
  • limit: integer. Limit to number of items. Works independently for each search type (Sellers, Merch.).

Result: json in this format:

  • res: string. If it's "ok", then query results are in data, otherwise res is description of error.
  • data: array of maps. Array of query's results.
    Each element contains:
    • suggest: string. Contains value to suggest.
    • type: string. Type of suggested item (Seller, Merch.).

@Kolaer Kolaer closed this as completed Nov 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
functionality Features that must be implemented.
Projects
None yet
Development

No branches or pull requests

2 participants