Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmarking different algo to speed up search. #123

Open
dhruv-1001 opened this issue Feb 26, 2024 · 3 comments
Open

Benchmarking different algo to speed up search. #123

dhruv-1001 opened this issue Feb 26, 2024 · 3 comments
Assignees
Labels
help wanted Extra attention is needed 💬 talk: discussion Open for discussions and feedback
Milestone

Comments

@dhruv-1001
Copy link
Collaborator

dhruv-1001 commented Feb 26, 2024

Description

Right now we have 4 administrative boundaries. State, District, Sub District, Village.
After project setup, master list for this can be found under server/geojson-data as PARSED_MASTER_LOCATION_NAMES.json which is derived from MASTER_LOCATION_NAMES.json.

We have an API that does fuzzy search on all levels, and returns the matches.
Right now the implementation is using Fuse, which is really slow. (implementation inside server/location.search.js
We need to benchmark the search with different algo(s) that uses trie data structure. Do some research on what provides us with best results.

References:
https://gist.github.com/smhanov/94230b422c2100ae4218
https://docs.rs/rsmorphy/latest/rsmorphy/dawg/index.html
https://johnresig.com/blog/javascript-trie-performance-analysis/
https://github.com/gotenxds/WordGraphs

@SakshumGusain
Copy link

Sir, I'm interested in taking up this ticket

@dhruv-1001
Copy link
Collaborator Author

Hey @SakshumGusain, sure! go ahead. Let me know, if you have any doubts.

@Mr-Sunglasses Mr-Sunglasses self-assigned this Mar 4, 2024
@Mr-Sunglasses Mr-Sunglasses added help wanted Extra attention is needed 💬 talk: discussion Open for discussions and feedback labels Mar 4, 2024
@Mr-Sunglasses Mr-Sunglasses added this to the v0.0.1-alpha milestone Mar 4, 2024
@akshatcoder-hash
Copy link

we can use separate trie for each level (state, district, subDistrict, village) to store the respective names allowing independent searches at each level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed 💬 talk: discussion Open for discussions and feedback
Projects
None yet
Development

No branches or pull requests

4 participants