POST /v2/retrieve accepts in sources and exclude_sources.
docs counts the publisher’s current documents: it is what tells you whether
restricting a question to that source will return anything. A publisher with no
active document left is not listed — publishing it would let a restriction
through that can only answer empty.
Restricting a question
"has" matches HAS), but nothing more: no fuzzy
matching, no lookup on the full name. An unknown source is refused with a 400
(UNKNOWN_SOURCE) and the list of the ones that exist — serving an empty answer
would make a typo read as a gap in the corpus.
An empty list is refused too: “no source ticked” and “every source” are
opposite intents, and conflating them would serve the whole corpus to a client
that believed it had restricted it. To restrict nothing, omit the field.
exclude_sources does the reverse — drop one publisher without enumerating all
the others. The response carries source_scope, the restriction actually
applied, in canonical ids.
What the restriction covers
Every path through the graph: excerpts, decision tables, citable units found by concepts as well as by vectors, and the neighbourhood between units — the one path that jumps from document to document, and therefore the only one an excluded publisher could come back through. The second reading (deliberate)
fires further searches: those are restricted as well.
Two deliberate exceptions:
- concepts — a concept belongs to no document; it is a shared registry term. The citable units it brings back are restricted;
- drugs — the SmPC subgraph comes from the ANSM reference, not from a guideline publisher. Hiding a contraindication because the guideline corpus was narrowed would be a failure mode, not a feature.
On a very small publisher, vector search may return fewer than
chunk_k
excerpts: the vector index ranks over the whole corpus and the filter applies
afterwards. The server oversamples to compensate, but truncation stays possible —
better known than discovered.