@maschinenlesbar.org/ckan-cli
    Preparing search index...

    Class CkanClient

    Index
    • get siteKey(): string

      The portal this client talks to as one identity (portalKey: host without www. and path, lower case; never a user name or password): to tell whether a portal of the list is this one.

      Returns string

    • Full-text / faceted dataset search.

      CKAN reads a repeated fq= key as a Python list and pastes it into the Solr filter, which fails with HTTP 409. So a single filter is sent as fq, and several as CKAN's fq_list (each its own Solr filter query; all must match). fq_list is only used for two or more, because CKAN splits a lone fq_list value into characters. Facet fields go out as the JSON list CKAN expects in facet.field. A blank q, sort, filter or facet field is refused (CkanValidationError), never sent or dropped. The search text q and each filter go out as text, trimmed and in NFC (normalizeText, textProblem); the sort expression (sortProblem: <field> asc|desc, …) and each facet field (fieldProblem: a Solr field name) as tokens (normalizeToken).

      Parameters

      Returns Promise<PackageSearchResult>

    • A client for another CKAN portal with this one's options (transport, timeouts, retries, user agent, hooks): another portal of a known list, through the same transport (and so the same request limits). The base URL is checked as the constructor checks it.

      Parameters

      • baseUrl: string

      Returns CkanClient