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

Feat search #300

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Feat search #300

wants to merge 9 commits into from

Conversation

sameet11
Copy link
Contributor

@sameet11 sameet11 commented Apr 17, 2024

PR Fixes: #175

  • added route to add search index to all the previous track which will help in local and production.
Dailycode.-.Google.Chrome.2024-04-18.00-03-51.1.mp4
  • added functionality in admin section to create search index at the time of uploading a newtrack.

-https://drive.google.com/file/d/17Uu64SDal69tg0wgyJlBCtMSRYGDlb9W/view?usp=sharing

Remaining (Suggestions needed):
Feature-To make change in search index whenever the notiondoc changes.
Answer - If notionApi permits a webhook like functionality. I will implement it within day. alternatively, we can add a get request to update the search index in intervals (will move with option 2 only if option 1 is not possible).

Also let me know if I am on the right track so that i can make the UI pleasing. Or did you mean something else.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I assure there is no similar/duplicate pull request regarding same issue


async function createIndex(obj: algoliaobjSchema[], trackID: string) {
const client = algoliasearch(process.env.ALGOLIA_APP_ID || "", process.env.ALGOLIA_ADMIN_API_KEY || "");
const index = client.initIndex(trackID);
Copy link
Contributor

Choose a reason for hiding this comment

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

It will be a good idea to protect API routes with auth or better use server actions instead of APIs.
I have made PR for the same issue you can check it #294

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes better to create server actions.

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.

Add content wide search
2 participants