The search endpoint queries the full-text inverted index built from all indexed Gutenberg books. You supply one or more terms in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/GuancheData/stage_3/llms.txt
Use this file to discover all available pages before exploring further.
q parameter and the service returns every book in which all of those terms appear, ranked by how frequently the terms occur across the document. Optional filters let you narrow results by author, language, or publication year.
The search service is available directly on port 7003, or through the Nginx reverse proxy on port 8080. For production use, prefer port 8080 so requests are load-balanced across all search nodes.
Query parameters
One or more space-separated search terms. The query uses AND semantics — every term must appear in a document for it to be included in results. Terms are lowercased and all non-alphanumeric characters are stripped before matching.
Filter results to books whose author field contains this string. The match is case-insensitive and substring-based —
austen matches "Austen, Jane".Filter results to books in the specified language. The match is case-insensitive and substring-based —
en matches "en".Filter results to books published in exactly this year. Must be a valid integer; an invalid value returns HTTP 400.
AND semantics
When you supply multiple space-separated terms inq, only books containing all of the terms are returned. For example, q=whale+sea matches only books where both whale and sea appear — not books that contain only one of the two terms.
Sorting and the frequency field
Results are sorted byfrequency in descending order by default, meaning books where the query terms appear most often rank first. frequency is the sum of per-term occurrence counts across the document — a book where whale appears 1000 times and sea appears 284 times would have a frequency of 1284.
The sort order can be changed to ascending by document ID by setting the SORTING_CRITERIA environment variable on the search service to id.
Requests
Basic query:Response fields
"success" on a successful query, "error" when the request is invalid or an internal error occurs.The raw value of the
q parameter as supplied in the request.The filter values applied to this query. Fields are omitted when not supplied.
Total number of matching documents returned.
Ordered list of matching books.
Response examples
- Success
- Error — missing q
- Error — invalid year
- Error — internal