Skip to content

cas 484 - Create search endpoint for Communities#433

Merged
0xmovses merged 5 commits intomainfrom
rich/cas-484
Sep 9, 2022
Merged

cas 484 - Create search endpoint for Communities#433
0xmovses merged 5 commits intomainfrom
rich/cas-484

Conversation

@0xmovses
Copy link
Copy Markdown
Contributor

@0xmovses 0xmovses commented Sep 8, 2022

• creates new endpoint /communities/search/{query}
• creates new controller, helper and models method.
• adds new migrations that install the extensions and indexing needed

I used the examples laid out here https://arctype.com/blog/postgres-fuzzy-search/#phonetic-match I had mixed results with all of them, the query that seemed to perform best is the one in this PR:
SELECT name FROM communities WHERE SIMILARITY(name, $1) > 0.1,

For the front end we might need to use url encoding on the param, for example if search query has a space in it like nba topshots

Just tested with Postman. No integration tests written for this feature

@linear
Copy link
Copy Markdown

linear Bot commented Sep 8, 2022

CAS-484

Copy link
Copy Markdown
Collaborator

@jbluks jbluks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@0xmovses 0xmovses merged commit e1b04f9 into main Sep 9, 2022
@0xmovses 0xmovses deleted the rich/cas-484 branch September 9, 2022 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants