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

Improve search bar funcionality based on real life requirements #769

Open
arkid15r opened this issue Feb 7, 2025 · 1 comment · May be fixed by #810
Open

Improve search bar funcionality based on real life requirements #769

arkid15r opened this issue Feb 7, 2025 · 1 comment · May be fixed by #810
Assignees

Comments

@arkid15r
Copy link
Collaborator

arkid15r commented Feb 7, 2025

Is your feature request related to a problem? Please describe.
OWASP Nest search/filtering/ranking/sorting is crucial part of the functionality. Finally we're at the point where we understand how it should be implemented.

Describe the solution you'd like
We need to improve the search bar component tackling multiple problems:

  • search request should go through the backend instead of direct algolia hits (more control, no unwanted interaction)
  • in-house developed auto-suggestions (again, more control over the behavior, but requires also more work)
  • text filtering for all entities (some work has been done here)

This is combined into a single task to avoid merge conflicts and any misunderstandings leading to incompatibility and eventually more work.

@arkid15r
Copy link
Collaborator Author

arkid15r commented Feb 8, 2025

@Rajgupta36 I tried to clarify the auto-suggestions part a bit:

Develop an auto-suggestion mechanism that leverages Algolia for ranking suggestions and GraphQL for fetching them on the frontend. The system should dynamically retrieve and return suggestions based on entity types.

  1. Data Indexing & Entity Mapping

    • Maintain separate Algolia indices for different entity types:
      • Projects (entity_type: project) → Project names.
      • Chapters (entity_type: chapter) → Chapter names and locations.
      • Users (entity_type: user) → User logins and names.
    • Add a periodic task for new or updated records.
  2. GraphQL API Design

    • Define a GraphQL query to fetch suggestions from Algolia.
    • Implement backend resolvers to query Algolia based on input parameters.
  3. Algolia Search Integration

    • Use Algolia search for real-time suggestions.
    • Implement ranking rules to prioritize exact matches, followed by partial matches.
    • Consider configure custom (secondary) ranking attributes (e.g., project level).

Deliverables

  • Algolia index setup with appropriate ranking rules. -
  • GraphQL API to fetch suggestions from Algolia.
  • Automated tests covering new functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants