twodim_analysis
Cross-tabulate a query's matching documents by two DocuSky classification facets to compare category distributions.
Instructions
Cross-tabulate a query's hits by two DocuSky classification facets at once.
EXPERIMENTAL: DocuSky added this endpoint on 2026-01-28, but live testing
on 2026-09-11 found it rejects every dim1/dim2 pair tried so far —
including facet codes taken straight from post_classification's own
output, such as "COMP"/"TP1" — with {"code": 1, "message": "Currently not support ..."}. DocuSky's own front-end has not wired up a UI for it
yet either. Call post_classification first to see which facet codes
exist for a database, try them here, and expect DocuSky may still refuse
the combination while this feature is unfinished on their end.
Args: db: Database title. dim1: First classification facet code (a key from post_classification's "facets", e.g. "COMP" or "TP1"). dim2: Second classification facet code to cross with the first. query: Search terms, or ".all" for the whole database. corpus: Corpus title, or "[ALL]". target: "OPEN" or "USER". owner_username: Owner of a friend-shared database, when applicable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| db | Yes | ||
| dim1 | Yes | ||
| dim2 | Yes | ||
| query | No | .all | |
| corpus | No | [ALL] | |
| target | No | OPEN | |
| owner_username | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |