TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/No-Country-simulation/G9-LATAM-Team-58/llms.txt
Use this file to discover all available pages before exploring further.
/search endpoint is Mindloom’s primary discovery surface. It supports two fundamentally different retrieval strategies: semantic mode, which encodes your query into a 384-dimensional embedding via the inference service and ranks results using VECTOR_DISTANCE(COSINE) in Oracle, and keyword mode, which falls back to a plain SQL LIKE scan against title and body — no inference call, no vector math, no ranked similarity. Both modes return the same SearchResponse envelope, but their internal behavior, performance characteristics, and edge-case semantics differ enough that you should treat them as distinct operations that happen to share a route.
Endpoint
Query Parameters
The search query string. A blank or whitespace-only value returns 400 VALIDATION_ERROR immediately — the controller validates this before dispatching to either search service.
Controls the retrieval strategy. Accepted values (case-insensitive):
semantic or keyword. Any other value returns 400 VALIDATION_ERROR with the message "Modo de búsqueda inválido: '…'. Use 'semantic' o 'keyword'".Optional category filter. Behavior differs by mode — see the Mode Behavior section and the warning below before relying on this parameter in keyword mode.
Zero-based page index used to calculate the SQL
OFFSET (offset = page × size).Number of results per page (
FETCH NEXT :limit ROWS ONLY).Mode Behavior
Semantic mode (mode=semantic)
- The API calls the inference service’s
POST /embedendpoint with the query andtype=query. The E5 model internally prepends"query: "to the text before encoding. - The resulting 384-float, L2-normalised vector is serialised to 1536 bytes and passed to Oracle.
- If
categoryis provided, the query runssemanticSearchWithCategory— a dedicated native query with aWHERE category = :categoryclause. Without it,semanticSearchis used (no category filter). - Results are ordered ascending by
VECTOR_DISTANCE(descending similarity).elapsedMsreflects real wall-clock time.
Keyword mode (mode=keyword)
- No call is made to the inference service.
- The API executes a native SQL
LIKEscan:WHERE title LIKE %:q% OR body LIKE %:q%. - Every result receives a fixed
similarityof1.0— there is no ranking. elapsedMsis always0(hardcoded).
Response — 200 OK
SearchResponse
The search mode that was used:
"semantic" or "keyword".The number of results returned in this page (
results.size()), not the total hit count in the corpus.Wall-clock time of the search operation in milliseconds. Real in
semantic mode; always 0 in keyword mode.The list of matched content items for this page.
Error Codes
| HTTP Status | error field | Cause |
|---|---|---|
400 | VALIDATION_ERROR | q is empty or blank, or mode is not "semantic" or "keyword" |
503 | INTERNAL_ERROR | The database is not configured (app.database.enabled=true is required), or the inference service is unreachable during mode=semantic (the /embed call failed) |