daily-code icon indicating copy to clipboard operation
daily-code copied to clipboard

Add content wide search

Open hkirat opened this issue 10 months ago • 13 comments

Allow users to search deep inside the contents of the blogs

  1. Should use something like algolia/elastic search
  2. There should be a way to refresh it whenever the notion doc changes

hkirat avatar Apr 11 '24 13:04 hkirat

@hkirat can you assign it to me

RaghavenderSingh avatar Apr 11 '24 13:04 RaghavenderSingh

on it.

sameet11 avatar Apr 11 '24 13:04 sameet11

Looking into this.

saxenaaman17 avatar Apr 11 '24 15:04 saxenaaman17

Proposal of the approach: Procedure:

  1. Add or Use a existing cache DB
  2. Create a function addSearchTokenToCacheDB ( Which creates seach tokens with the words inside the paths of the track and store it to Cache)
  3. Call it everytime admin creates a track
  4. 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)
  5. Might also need a Lambda kind of function initially propogates the cache db in the CI/CD workflow. ( Not sure about this )

image

Expecting this feature to be added with a deep discussion and implementation plan.

SujithThirumalaisamy avatar Apr 12 '24 09:04 SujithThirumalaisamy

Will it be able to search from the notion Doc?

nimit9 avatar Apr 12 '24 12:04 nimit9

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

SujithThirumalaisamy avatar Apr 12 '24 12:04 SujithThirumalaisamy

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

sameet11 avatar Apr 14 '24 12:04 sameet11

Yes exactly, But I cannot proceed until we have access to the API. Ready with a elastic search local setup in my homelab server.

SujithThirumalaisamy avatar Apr 14 '24 13:04 SujithThirumalaisamy

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

ShubhamMewara avatar Apr 15 '24 20:04 ShubhamMewara

hi @ShubhamMewara , did you added the deep search for the whole blog( notion doc as well)?

D3vq avatar Apr 16 '24 16:04 D3vq

@D3vq yes i did

ShubhamMewara avatar Apr 16 '24 17:04 ShubhamMewara

@ShubhamMewara can we connect on discord, my username is mister0261 if you want to connect

D3vq avatar Apr 16 '24 17:04 D3vq

@D3vq ok

ShubhamMewara avatar Apr 16 '24 17:04 ShubhamMewara