Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Create RESTful search API in Go #260

Closed
magicoder10 opened this issue Oct 16, 2019 · 17 comments · Fixed by #539 or #832
Closed

Create RESTful search API in Go #260

magicoder10 opened this issue Oct 16, 2019 · 17 comments · Fixed by #539 or #832
Assignees
Labels
enhancement New feature or request Go Issue requires to write code using Go language p2 Low priority

Comments

@magicoder10
Copy link
Member

magicoder10 commented Oct 16, 2019

Please support async and request cancellation based on the examples provided in the comment.
#238

@magicoder10
Copy link
Member Author

@lucifercr07
Copy link
Contributor

@byliuyang will like to take it up

@lucifercr07
Copy link
Contributor

Api: /api/search
Header: Auth token
Query params:

  1. Paging: query params page.size = 10, page.number = 1 (static for now)
  2. type: private or public

@magicoder10
Copy link
Member Author

magicoder10 commented Oct 20, 2019

@lucifercr07 For now, we can hard code page.size. Let open an issue to track custom page size feature. Please document the API endpoint with Swagger ( OpenAPI 3 ). Let's also open an new issue to configure Dredd, a language-agnostic command-line tool for validating API description document against backend implementation of the API.

@magicoder10
Copy link
Member Author

magicoder10 commented Nov 17, 2019

Let's scope this feature down to easy development progress:

  1. Create repository interfaces in usecase/repo package. Those interfaces are purely responsible for database access and have nothing to do with search. Create search functionalities (are dependent on usecase/repo interfaces) in usercase/search package.
  2. Create RESTful API placeholders in adapter/routing package
  3. Call search use cases in the RESTful API.

Hope this helps.

@luisfmelo
Copy link

Is this being developed?

@lucifercr07
Copy link
Contributor

@luisfmelo yes

@magicoder10
Copy link
Member Author

Hi @luisfmelo are there any other issue you are interested?

@magicoder10 magicoder10 moved this from To do to In progress in Short 1.0 Dec 25, 2019
@magicoder10 magicoder10 moved this from In progress to To do in Short 1.0 Jan 19, 2020
@magicoder10 magicoder10 removed this from the Alpha milestone Jan 28, 2020
@magicoder10 magicoder10 assigned dawntomm and unassigned lucifercr07 Mar 6, 2020
@magicoder10 magicoder10 added this to the 02/29-03-06 milestone Mar 6, 2020
@magicoder10
Copy link
Member Author

For now, please only search private alias

@dawntomm
Copy link
Contributor

dawntomm commented Mar 6, 2020

I will work on it

@alldroll alldroll added the Go Issue requires to write code using Go language label Mar 6, 2020
@magicoder10 magicoder10 modified the milestones: 02/29-03-06, 03/07 - 03/13 Mar 7, 2020
@dawntomm dawntomm linked a pull request Mar 9, 2020 that will close this issue
Short 1.0 automation moved this from To do to Done Mar 12, 2020
@dawntomm dawntomm linked a pull request Mar 12, 2020 that will close this issue
@magicoder10
Copy link
Member Author

@magicoder10 magicoder10 added this to To do in Search APIs via automation Apr 10, 2020
@magicoder10
Copy link
Member Author

Maybe also consider how to build our own Elasticsearch.

@magicoder10
Copy link
Member Author

@magicoder10
Copy link
Member Author

@arberiii
Copy link
Member

During my research I found those articles useful:

@magicoder10
Copy link
Member Author

Discussed offline. Due to the complexity of the search engine, let's simplify and focus on implement concurrent search for users and urls for now.

@magicoder10
Copy link
Member Author

To be done now

  1. Build the simple search API for user to search their short links

Future Plan

  1. Extend the search API to support searching both short link & users concurrently
  2. Extract out search into a generic cloud service.

@arberiii arberiii linked a pull request Jun 3, 2020 that will close this issue
Short 1.0 automation moved this from In progress to Done Jun 4, 2020
Search APIs automation moved this from To do to Done Jun 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Go Issue requires to write code using Go language p2 Low priority
Projects
Short 1.0
  
Done
Search APIs
  
Done
8 participants