public_exercises

Search Public Exercises

Hybrid vector + keyword search over public_exercises.

The search core (embed → vector KNN → keyword regex → RRF merge → hydrate

  • gate) lives in services/exercise_library_search.py, shared with the chat tool search_exercise_library.

The response shape mirrors GET /public-exercises so callers can reuse the existing PublicExerciseOut type.

get/public-exercises/search

Query parameters

qstring required

Free-text search query.

Free-text search query.

category_pathstring[] nullable

Prefix filter on category_path (repeat the query param per segment). Results are post-filtered to rows whose category_path starts with these segments.

Prefix filter on category_path (repeat the query param per segment). Results are post-filtered to rows whose category_path starts with these segments.

difficultystring nullable

Exact-match filter on difficulty (easy/medium/hard).

Exact-match filter on difficulty (easy/medium/hard).

type'exercice' | 'automatisme' | 'application_du_cours' nullable

Exact-match filter on type.

Exact-match filter on type.

library'excellence' | 'cpge' | 'remediation' nullable

Admin-only library override. Non-admin callers stay gated by library_filter_for(user) regardless of this param.

Admin-only library override. Non-admin callers stay gated by library_filter_for(user) regardless of this param.

subject'maths' | 'physique-chimie' nullable

Scope search to a matière (see list endpoint).

Scope search to a matière (see list endpoint).

top_ninteger

Max number of results.

Max number of results.

Response

Successful Response

idstring required
themesstring[] required
contentstring required
solutionstring required
figure_contentstring nullable
figure_solutionstring nullable
created_atstring date-time required
updated_atstring date-time required
sequence_numberinteger nullable
difficultystring nullable
category_pathstring[]
subject'maths' | 'physique-chimie'
library'excellence' | 'cpge' | 'remediation'
type'exercice' | 'automatisme' | 'application_du_cours'
likes_countinteger
savoirs_faire_idsstring[]
titlestring nullable

Changes

No recorded changes to this endpoint across all 3 revisions of this API.