daily-code
daily-code copied to clipboard
Add content wide search
Allow users to search deep inside the contents of the blogs
- Should use something like algolia/elastic search
- There should be a way to refresh it whenever the notion doc changes
@hkirat can you assign it to me
on it.
Looking into this.
Proposal of the approach: Procedure:
- Add or Use a existing cache DB
- Create a function addSearchTokenToCacheDB ( Which creates seach tokens with the words inside the paths of the track and store it to Cache)
- Call it everytime admin creates a track
- Create a GET /search endpoint (Which returns a array of links which are inside the token with the key as x which is a superset of the search query)
- Might also need a Lambda kind of function initially propogates the cache db in the CI/CD workflow. ( Not sure about this )
Expecting this feature to be added with a deep discussion and implementation plan.
Will it be able to search from the notion Doc?
We should fetch the notion doc somehow and feed the data to the token generation and store it in the datastore or some kind of cache to be fast enough
are we creating a Search functionality to search data from the whole track or to search data only from a single page of the track ?@hkirat @SujithThirumalaisamy
Yes exactly, But I cannot proceed until we have access to the API. Ready with a elastic search local setup in my homelab server.
hey @hkirat I have used algolia.com to search Would you like to remove the previous search or want to keep it?
https://github.com/code100x/daily-code/assets/136337515/63c24a5c-994b-4d7f-ab95-699f7142dd3b
hi @ShubhamMewara , did you added the deep search for the whole blog( notion doc as well)?
@D3vq yes i did
@ShubhamMewara can we connect on discord, my username is mister0261 if you want to connect
@D3vq ok