Running the search API
Linked Open Limburg (LOL) publishes a ready-to-run search integration layer: a GraphQL API over the curated Limburg collections. To query it, you need none of this page: use the public endpoint. Run the stack yourself to work offline, to pin a release, to index other datasets or to change the search schema. Our prebuilt Docker images bring it up:
codeberg.org/limburg/lol/search-api(the read side): the GraphQL API on:4000;codeberg.org/limburg/lol/search-indexer(the write side): retrieves datasets via the Dataset Register and indexes them into Typesense.
The LOL components and Docker images are built on LD Elements (LDE). The public endpoint runs the same images on Kubernetes; its hosting is described in infra/scaleway and infra/cluster.
Run it
Grab the one Compose file and run:
curl -O https://codeberg.org/limburg/lol/raw/branch/main/infra/search-indexer/docker-compose.yml
docker compose up -d # Typesense + the API on :4000
docker compose run --rm indexer # fill TypesenseOur images default to the :latest tag, and the Compose file gives them pull_policy: always, so every up (and every run --rm indexer) checks the registry and you stay on the current build without thinking about it. A stack that is already running does not upgrade itself, though: re-run docker compose up -d to move it forward – Compose pulls, recreates the containers whose image changed and leaves the rest alone. Set LOL_TAG to pin a release, or pass --pull never to work offline. To upgrade Typesense, which the Compose file pins to an exact version, take a newer Compose file.
A release that changes the search schema needs nothing extra either: each indexer run builds fresh collections and swaps them in when it is done, so docker compose run --rm indexer after an upgrade brings the index up to the new schema. Until it finishes, the API keeps serving the previous index.
Upgrading from a release before the indexer switched to blue/green rebuilds is the one exception: the old collections hold the names the new ones are swapped in under. Start Typesense from empty once:
docker compose down -v # drops the Typesense data
docker compose up -d # back to Typesense + the API
docker compose run --rm indexer # rebuild the collections from scratchThe indexer’s own volume survives this, which is what you want: it keeps the terms resolved from the Network of Terms and the IIIF manifests already read, so the rebuild doesn’t fetch them again.
Everything is pre-configured (the register, dataset selection, data dir and Typesense key) so there is nothing to set; on Linux, set DOCKER_GID for the QLever import (it defaults to 0, which is correct on Docker Desktop).
Once it is up, it serves GraphQL at:
http://localhost:4000/graphqlEvery query in Using the search API works on it too; the “Run query” buttons open the public endpoint, so paste a query into your local playground instead.
Pin a release
If you build on the API, pin it rather than follow :latest, so a breaking change never reaches you unannounced.
LOL_TAG is the image tag the Compose file runs, for the API and the indexer alike (search-api:${LOL_TAG:-latest}). One variable for both keeps the indexer writing the documents the API reads, since both images of a release carry its version. Set it in a .env file next to the Compose file, which Compose reads on every command:
echo 'LOL_TAG=0.5' > .env
docker compose up -d
docker compose run --rm indexerPrefixing each command (LOL_TAG=0.5 docker compose …) works too, but a command without it runs :latest: an indexer run that forgets it writes a schema the pinned API may not read.
LOL_TAG | Runs |
|---|---|
unset or latest | the newest build of main, breaking changes included |
0.5 | the newest 0.5.x release: features and fixes, no breaking change |
0.5.2 | that release, exactly |
{YYYYMMDDHHmmss}-{sha} | that build of main, exactly |
Versions follow semantic versioning, adjusted for 0.x: a breaking change bumps the minor (0.5 → 0.6), anything else the patch. From 1.0 on, the pin becomes the major (1). With pull_policy: always, re-running docker compose up -d and the indexer on 0.5 takes the newest 0.5.x; it never moves you to 0.6.
Each release lists its changes, with the breaking ones marked ⚠️. To take a breaking release, read its notes, raise LOL_TAG in .env, and run docker compose up -d and docker compose run --rm indexer again.
Customization
There is a gradient of customization, and in most cases you don’t need to clone this repository:
Configuration only
Point the indexer elsewhere, or index more, with plain environment variables on the same image. For example, change the dataset selection:
DATASETS="https://id.drapo.nl/dataset/drapo-schemaorg https://example.org/dataset/other" \
docker compose run --rm indexerThe index then holds only the datasets you list, so the API stops serving the others until a run without DATASETS brings them back.
REGISTRY_ENDPOINT, TYPESENSE_*, DATA_DIR and the rest are environment too; see the LDE docs for the complete list.
Change the search schema
The search schema (@lol/search-schema) defines which objects, fields and facets the API exposes. To change the search schema, clone this repository and use the dev overlay (docker-compose.dev.yml): it runs the stock LDE images with your locally built schema mounted:
git clone https://codeberg.org/limburg/lol
cd lol
npm install
# edit packages/search-schema/src/…, then:
npx nx up @lol/search-schema # once: Typesense + API on the stock LDE images, schema mounted
# after each edit:
npx nx index @lol/search-schema # bundle, then reindex
docker compose -f infra/search-indexer/docker-compose.yml -f infra/search-indexer/docker-compose.dev.yml restart api # load the edited schema
npx nx down @lol/search-schema # when you are doneThe stock images skip LOL’s indexer transforms and JSON-LD context replacement, so the results can differ from the released images. The deployment README has the details.