Skip to content

v0.2.13: Collection-scoped search and routable browse slugs

Choose a tag to compare

@cyanheads cyanheads released this 16 Jul 05:29
v0.2.13
bd81469

Collection-scoped search and routable browse slugs

Completes the browse-to-search workflow: browse_collections slugs now round-trip to their LOC routes, and search can scope to one collection.

Added:

  • collection_slug on libofcongress_search — scopes a search to one curated collection via the LOC /collections/{slug}/ endpoint, which takes the same query string and returns the same envelope; enrichment.effectiveCollectionSlug echoes the applied scope (#35)
  • incompatible_filters rejects format + collection_slug before any request — each selects a different LOC base path
  • collection_not_found names an unrecognized slug and points recovery at libofcongress_browse_collections

Fixed:

  • libofcongress_browse_collections returns the routable slug — extraction takes the first path segment after /collections/ rather than anchoring to the end of the URL, which missed the /about-this-collection/ subpath LOC returns on every browse result and fell back to a title-derived slug (#37)
  • libofcongress_browse_collections populates item_count from the upstream top-level count, typeof-guarded so a genuine count: 0 survives (#32)
  • normalizePagination falls back to results only when it is numeric — LOC sends a display range ("1 - 3") under that numeric-sounding key
  • README and docs/design.md describe collection_slug in place of a partof facet, which returns zero results

190 tests pass; bun run devcheck clean.

CHANGELOG v0.2.13