Archive Search Guide
Search strategy, syntax, and best practices for the Riksarkivet search tools
(search_transcribed and search_metadata).
Tool Selection
| Research goal |
Tool |
Key params |
| Find text mentions in court records |
search_transcribed |
keyword |
| Find a person by name |
search_metadata |
name="Svensson" |
| Find documents from a place |
search_metadata |
place="Norrköping" |
| Find documents by title/type |
search_metadata |
keyword="bouppteckning" |
| Church records, estate inventories |
search_metadata |
keyword + place (not AI-transcribed) |
| Read full page content |
browse_document |
reference_code, pages |
Query Syntax — What Actually Works
The search API is a plain free-text engine, NOT a full Solr/Lucene endpoint.
Every syntax claim below is verified against the live API.
| Syntax |
Example |
Meaning |
| Single term |
Stockholm |
Find the word |
| Several terms |
pest smitta |
ALL terms required in the same document (implicit AND) |
| Wildcard |
troll*, st?ckholm, *holm |
* = many chars, ? = one char |
| Fuzzy |
Stockholm~1 |
Similar words (edit distance) |
NOT supported — never use:
AND / OR / NOT / | / parentheses. There is no boolean parser. The
words AND/OR/NOT are searched as literal text: and alone matches 1.6M
volumes, so pest AND smitta returns ~1.64M junk hits instead of the
33-document conjunction pest smitta. The server rejects such queries.
- OR-logic has no syntax at all. Run one search per alternative term
instead: search
troll*, then häx*, and merge what you learn.
- Quoted phrases on transcribed text. They always return 0 — even a phrase
that occurs verbatim and adjacent on a page ("Venerisk smitta") yields no
hits. Never quote in
search_transcribed; use plain multi-term search
(kyrka stöld = both words anywhere in the volume). In search_metadata,
quotes work only for reference codes: "SE/RA/720660" lists an archive's
volumes, but quoted title phrases return 0.
- Proximity
"a b"~10. Not honored — returns 0 like any quoted phrase.
- Boosting (
term^4). Unverified; adds nothing. Leave it out.
Transcription Quality — Why Fuzzy Search Matters
All searchable text is AI-generated using HTR (Handwritten Text Recognition) and OCR models.
These transcriptions contain recognition errors: misread characters, merged or split words, and
garbled passages — especially in older, damaged, or poorly legible documents.
Always use fuzzy search (~) by default to compensate for transcription errors:
stockholm~1 finds "Stockholm", "Stockholn", "Stookholm" (common HTR misreads)
trolldom~1 finds "trolldom", "trolldoin", "trolldorn"
präst~1 finds "präst", "prast", "prest"
Without fuzzy search, you will miss many relevant results because the transcription
of the exact word you're looking for may contain errors.
Rule of thumb: Use ~1 (edit distance 1) for short words, ~2 for longer words or
very old/damaged documents. For stem variants use a wildcard instead: troll*.
Search Strategy for Maximum Discovery
- Start with transcribed text:
search_transcribed(keyword, offset=0) for initial hits
- Check metadata too:
search_metadata to find documents by title, person, or place
- Paginate: Increase offset by 50 (50, 100, 150...) to discover more matches
- Explore related terms — one search each (this replaces OR):
- Historical variants and spellings (e.g., "trolldom", then "häxa", then "trollkona")
- Synonyms and related concepts (e.g., "satan", then "djäfvul" for devil-related terms)
- Different word forms (e.g., "trolleri", then "trollkonst")
- Period-appropriate terminology and archaic spellings
- Narrow with more terms: adding a word tightens the search —
pest smitta
returns only documents containing both
- Drill down: Note reference codes and page numbers from results, then use
browse_document to examine interesting matches in full
Old Swedish Spelling Variants
Common spelling pairs to search for — always try both modern and archaic forms
(as separate searches, or covered by one wildcard/fuzzy term):
| Modern |
Archaic / Variant |
Covered by |
| präst |
prest |
pr?st or präst~1 |
| silver |
silfver, silfv |
sil*er or silf* |
| guld |
gull |
gul* |
| kyrka |
kyrcka, kyrck |
kyrk* or kyrck* |
| kvinna |
qvinna, qwinna |
q*inna or kvinna~1 |
| stöld |
tiufnad, tjufnad |
separate searches |
| häxa |
hexa |
h?xa |
| trolldom |
trulldom |
tr?lldom |
| djävul |
djäfvul, diefvul |
dj?f* + separate searches |
General letter drift: ä↔æ/e, ö↔ø/o, v↔f/fv/w, k↔ck/c — ? and ~1 absorb most of it.
Best Practices
- Wildcards for word variations:
troll* finds "trolldom", "trolleri", "trollkona"
- Fuzzy for AI transcription errors:
Stockholm~1 catches HTR/OCR misreads
- Multi-term to require co-occurrence:
kyrka stöld silver = volumes containing all three
- Year filtering: Use
year_min/year_max to narrow time periods
- Sorting:
sort="timeAsc" for earliest mentions, sort="timeDesc" for most recent
- Metadata search: Use dedicated
name and place parameters in search_metadata
for targeted person/place searches instead of putting everything in keyword
1---2name: archive-search3description: How to query the Riksarkivet search tools — load BEFORE calling search_transcribed or search_metadata. Picks the right tool and builds queries with the fuzzy, wildcard, and old-Swedish-spelling tactics that AI transcription errors demand. Use when the user wants to search, find, or look up documents, people, places, or events in the Swedish National Archives (Riksarkivet) — including terms like trolldom, häxprocess, bouppteckning, or dombok.4---56# Archive Search Guide78Search strategy, syntax, and best practices for the Riksarkivet search tools9(`search_transcribed` and `search_metadata`).1011## Tool Selection1213| Research goal | Tool | Key params |14|--------------|------|-----------|15| Find text mentions in court records | search_transcribed | keyword |16| Find a person by name | search_metadata | name="Svensson" |17| Find documents from a place | search_metadata | place="Norrköping" |18| Find documents by title/type | search_metadata | keyword="bouppteckning" |19| Church records, estate inventories | search_metadata | keyword + place (not AI-transcribed) |20| Read full page content | browse_document | reference_code, pages |2122## Query Syntax — What Actually Works2324The search API is a plain free-text engine, NOT a full Solr/Lucene endpoint.25Every syntax claim below is verified against the live API.2627| Syntax | Example | Meaning |28|--------|---------|---------|29| Single term | `Stockholm` | Find the word |30| Several terms | `pest smitta` | ALL terms required in the same document (implicit AND) |31| Wildcard | `troll*`, `st?ckholm`, `*holm` | `*` = many chars, `?` = one char |32| Fuzzy | `Stockholm~1` | Similar words (edit distance) |3334**NOT supported — never use:**3536- **`AND` / `OR` / `NOT` / `|` / parentheses.** There is no boolean parser. The37 words AND/OR/NOT are searched as literal text: `and` alone matches 1.6M38 volumes, so `pest AND smitta` returns ~1.64M junk hits instead of the39 33-document conjunction `pest smitta`. The server rejects such queries.40- **OR-logic has no syntax at all.** Run one search per alternative term41 instead: search `troll*`, then `häx*`, and merge what you learn.42- **Quoted phrases on transcribed text.** They always return 0 — even a phrase43 that occurs verbatim and adjacent on a page ("Venerisk smitta") yields no44 hits. Never quote in `search_transcribed`; use plain multi-term search45 (`kyrka stöld` = both words anywhere in the volume). In `search_metadata`,46 quotes work only for reference codes: `"SE/RA/720660"` lists an archive's47 volumes, but quoted title phrases return 0.48- **Proximity `"a b"~10`.** Not honored — returns 0 like any quoted phrase.49- **Boosting (`term^4`).** Unverified; adds nothing. Leave it out.5051## Transcription Quality — Why Fuzzy Search Matters5253All searchable text is **AI-generated** using HTR (Handwritten Text Recognition) and OCR models.54These transcriptions contain recognition errors: misread characters, merged or split words, and55garbled passages — especially in older, damaged, or poorly legible documents.5657**Always use fuzzy search (~) by default** to compensate for transcription errors:5859- `stockholm~1` finds "Stockholm", "Stockholn", "Stookholm" (common HTR misreads)60- `trolldom~1` finds "trolldom", "trolldoin", "trolldorn"61- `präst~1` finds "präst", "prast", "prest"6263Without fuzzy search, you will **miss many relevant results** because the transcription64of the exact word you're looking for may contain errors.6566**Rule of thumb**: Use `~1` (edit distance 1) for short words, `~2` for longer words or67very old/damaged documents. For stem variants use a wildcard instead: `troll*`.6869## Search Strategy for Maximum Discovery70711. **Start with transcribed text**: `search_transcribed(keyword, offset=0)` for initial hits722. **Check metadata too**: `search_metadata` to find documents by title, person, or place733. **Paginate**: Increase offset by 50 (50, 100, 150...) to discover more matches744. **Explore related terms — one search each** (this replaces OR):75 - Historical variants and spellings (e.g., "trolldom", then "häxa", then "trollkona")76 - Synonyms and related concepts (e.g., "satan", then "djäfvul" for devil-related terms)77 - Different word forms (e.g., "trolleri", then "trollkonst")78 - Period-appropriate terminology and archaic spellings795. **Narrow with more terms**: adding a word tightens the search — `pest smitta`80 returns only documents containing both816. **Drill down**: Note reference codes and page numbers from results, then use82 `browse_document` to examine interesting matches in full8384## Old Swedish Spelling Variants8586Common spelling pairs to search for — always try both modern and archaic forms87(as separate searches, or covered by one wildcard/fuzzy term):8889| Modern | Archaic / Variant | Covered by |90|--------|-------------------|-----------|91| präst | prest | `pr?st` or `präst~1` |92| silver | silfver, silfv | `sil*er` or `silf*` |93| guld | gull | `gul*` |94| kyrka | kyrcka, kyrck | `kyrk*` or `kyrck*` |95| kvinna | qvinna, qwinna | `q*inna` or `kvinna~1` |96| stöld | tiufnad, tjufnad | separate searches |97| häxa | hexa | `h?xa` |98| trolldom | trulldom | `tr?lldom` |99| djävul | djäfvul, diefvul | `dj?f*` + separate searches |100101General letter drift: ä↔æ/e, ö↔ø/o, v↔f/fv/w, k↔ck/c — `?` and `~1` absorb most of it.102103## Best Practices104105- **Wildcards for word variations**: `troll*` finds "trolldom", "trolleri", "trollkona"106- **Fuzzy for AI transcription errors**: `Stockholm~1` catches HTR/OCR misreads107- **Multi-term to require co-occurrence**: `kyrka stöld silver` = volumes containing all three108- **Year filtering**: Use `year_min`/`year_max` to narrow time periods109- **Sorting**: `sort="timeAsc"` for earliest mentions, `sort="timeDesc"` for most recent110- **Metadata search**: Use dedicated `name` and `place` parameters in `search_metadata`111 for targeted person/place searches instead of putting everything in `keyword`