Closed kkraune closed 1 year ago
It's possible to visit all documents across all document types in a given cluster through the /document/v1/
path directly (i.e. no namespace/doc type), though this requires specifying the target content cluster via the cluster
request parameter. Further constraints can be added via the selection
parameter, which takes any valid document selection string (such as simply a document type).
Today's ordering /document/v1/<namespace>/<doctype>/
should ideally be the inverse, i.e. /document/v1/<doctype>/<namespace>
since that allows for namespace-agnostic visiting for a given document type, which is far more common than the other way around. But this cannot readily be changed in V1. It's high up on the TODO list for Document V2.
Right! it is even documented:
curl http://hostname:8080/document/v1/?cluster=mycluster
I will de-clutter the documentation at https://docs.vespa.ai/en/document-v1-api-guide.html, add some troubleshooting and better examples.
doc improved in https://github.com/vespa-engine/documentation/pull/2325
Clients can use whatever namespace when feeding documents. To access documents using /document/v1, this namespace must be known.
This is most often the problem for new users / users working on a new installation with little prior knowledge
It is possible to dump documents, or IDs without knowing namespace or doctype, like
With this, I quickly learn both namespace and doctype
When querying, one can query whatever doctype in YQL, and namespace is not used in the query API
I suggest adding new features to document/v1, like a wildcard for the two, or a new path - so one can explore the data with no prior knowledge, like using vespa-visit.