TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/StarTrail-org/PixelRAG/llms.txt
Use this file to discover all available pages before exploring further.
/departments endpoint lists the departments available for use with the department filter in /search requests. Departments map to top-level subdirectories in the source document tree and are recorded in the index at build time by pixelrag index build. When you pass department to /search, the server pre-filters the FAISS index to only score vectors belonging to that department — this is a true pre-filter, not post-filtering, so you are guaranteed up to n_docs results when the department has enough tiles.
Method: GETPath:
/departmentsRequest body: none
Response
departments has:
Department identifier string. Pass this value as
department in a /search request.Number of source documents (articles) belonging to this department.
name.
Error Conditions
GET /departments always returns HTTP 200. When the index was built without department metadata, the response contains an empty departments list rather than an error:
HTTP 400 error occurs on POST /search when a department filter is specified but the loaded index has no department metadata:
404 is returned by /search when the requested department name is not found in the index.
Department metadata requires a local source with a directory-per-department layout. Web (
kiwix, web) and flat local sources have no department structure. See pixelrag index build for details on the expected directory layout.Using the Department Filter in Search
Once you have a department name from/departments, pass it to /search as the department field: