Documentation
¶
Overview ¶
Package tlc harvests peer libraries' subject cataloging from TLC (The Library Corporation) LS2 PAC catalogs through the anonymous search endpoint: one POST per driver term with the term as BOTH the keyword and a Subject facet filter, so the keyword surfaces candidates and the facet enforces subject-cataloging precision. A tenant is a bare <tenant>.tlcdelivers.com subdomain or a full vanity catalog host (e.g. ls2pac.lapl.org) serving the same API.
The subject index is unscoped (LCSH, Homosaurus and others merge, and a record carries no scheme tag), so like the BiblioCommons harvest this is the inference model -- the match is the exact Homosaurus prefLabel string -- not Vega's authoritative source tag. Every probed record carried at least one typed ISBN, which is the work-match key.
Index ¶
Constants ¶
const Name = "tlc"
Name is the enrichment source name; suggestions carry PIPELINE provenance.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enricher ¶
type Enricher struct {
// contains filtered or unexported fields
}
Enricher harvests one or more LS2 PAC tenants.
func (*Enricher) Enrich ¶
func (e *Enricher) Enrich(ctx context.Context, works []ingest.WorkSummary) ([]ingest.Enrichment, error)
Enrich implements ingest.Enricher: per tenant (concurrent, capped) run one faceted search per driver term (memoized within the TTL), match record ISBNs back to the scoped works, and emit one suggestion per (work, term) endorsed by every corroborating tenant.
func (*Enricher) ForHosts ¶
ForHosts returns a per-run view over a different tenant list (the per-job host override); the crawl cache is shared, the stats its own.
func (*Enricher) RunStats ¶
func (e *Enricher) RunStats() ingest.EnrichStats
RunStats implements ingest.StatsReporter: Total is hosts x driver terms, Batches the (host, term) crawls completed (cache-warm counted instantly), SkippedBatches the per-host terms abandoned on an error, Candidates the live matches so far. Safe mid-run.
type Option ¶
type Option func(*Enricher)
Option configures the enricher.
func WithCacheTTL ¶
WithCacheTTL overrides how long a completed harvest is reused.
func WithHostConcurrency ¶
WithHostConcurrency overrides how many tenants crawl at once.
func WithMaxPages ¶
WithMaxPages caps pages fetched per (host, term).