OWASP / OWASP/Nest

Extend Structured Search framework across all core entities

Open
#3,777 5 comments 0 reactions 1 assignee Claimed by @saichethana28 View on GitHub
bug enhancement
Dominant language
Python
Stars
451
Forks
702
Avg merge
22h 59m
Merged PRs (30d)
91

Description

**Is your feature request related to a problem? Please describe.**
Currently, structured search is implemented only for projects. Other major entities such as chapters, members, organizations, and repositories still rely on basic filtering or limited query capabilities.

This results in an inconsistent search experience across the platform. Users cannot apply advanced filters (e.g., numeric comparisons, aliases, or typed queries) uniformly, and malformed queries may lead to unclear behavior or poor feedback.

**Describe the solution you'd like**
Extend the existing structured search system to support all major entities, including:

- Chapters
- Members
- Organizations
- Repositories

For each entity:

- Define supported searchable fields and aliases
- Integrate the QueryParser with entity-specific filters
- Map parsed conditions to Django ORM queries
- Add consistent input validation and error handling
- Improve API responses for invalid or unsupported queries

This will provide a unified, flexible, and robust search experience across the platform.

**Describe alternatives you've considered**
Implementing separate custom filtering logic for each entity without using the shared QueryParser.

However, this would lead to duplicated logic, higher maintenance cost, and inconsistent behavior. Extending the existing structured search framework is more scalable and maintainable.

**Are you going to work on implementing this?**

- [x] Yes
- [ ] No

**Additional context**
This builds on the recently merged structured search implementation for projects.

The extension will reuse and enhance:

- `apps/api/rest/v0/structured_search.py`
- `apps/common/search/query_parser.py`

and introduce entity-specific schemas, improved validation, and comprehensive tests to ensure consistent behavior across endpoints.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.