How search works
The backend indexes OWASP data into Algolia on a scheduled basis. Each content type has its own Algolia index:| Index | Content |
|---|---|
projects | OWASP projects with names, summaries, tags, levels, and GitHub statistics |
chapters | OWASP chapters with names, summaries, countries, and geographic coordinates |
issues | Open GitHub issues with titles, summaries, labels, and project references |
useSearchPage hook to manage queries, pagination, and sorting state.
Searching from the UI
Each list page (Projects, Chapters, Contribute) has a search bar that triggers a live Algolia query as you type. Results update instantly without a full page reload.Projects search
On the Projects page you can:- Search by project name, keywords in the description, or topic tags.
- Sort by relevance, stars, forks, contributors, or activity.
- Filter to show only projects with a specific activity level.
Chapters search
On the Chapters page you can:- Search by chapter name or description keywords.
- Filter by country using the country dropdown, which applies an Algolia facet filter on the
idx_countryattribute. - Sort by name or recent activity.
Issues search
On the Contribute page you can:- Search by issue title, description, label names, or project name.
- Results include issues from all active OWASP projects.
Search proxy endpoint
The frontend does not query Algolia directly. Instead, it sends POST requests to the backend’s/idx/ endpoint (configured via NEXT_PUBLIC_IDX_URL). The backend proxies these requests to Algolia server-side, so no Algolia API key is needed in the frontend.
The request body format used by the fetchAlgoliaData utility in src/server/fetchAlgoliaData.ts:
hits (array of matching records) and nbPages (total page count).
This
/idx/ proxy is separate from the public REST API at /api/v0/. It is used exclusively by the Nest frontend and is not part of the public API surface.Facets and filters
Algolia facet filtering is used for structured filtering that goes beyond text matching:- Country filter on the Chapters page uses
idx_countryas a facet attribute. - Level filter on the Projects page can filter by
idx_level(Flagship, Production, Lab, Incubator).
GetChapterCountriesDocument) so that the UI can populate filter dropdowns with only the values that exist in the current data set.
