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

Fetch /gsoc command data from Algolia instead of DB #712

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

Conversation

Dishant1804
Copy link
Collaborator

Resolves #686

Made a separate file for gsoc search api that fetches the data from algolia, also the searchable attribute is set to idx_custom_tags so that we only get the tag list, which was expected in the issue.

@Dishant1804
Copy link
Collaborator Author

@arkid15r I've made necessary changes. Please let me know if any changes are required :)

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

We already have project search related entity, let's use that instead of adding another similar entity.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You should use existing owasp/api/search/project logic instead.

from apps.owasp.models.project import Project

query = f"gsoc{year}"
searchable_attributes = ["idx_custom_tags"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should extend it to idx_tags too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

And idx_topics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor /gsoc command to fetch data from algolia index
2 participants