# Finding a paper by author and year

The dev publication gateway supports bibliographic discovery alongside topic search. The same customer entitlements apply to both. No model inference or embeddings are involved.

## Search modes

| Interface | Default | Behaviour |
|---|---|---|
| REST `GET /v1/articles` | `search_mode=terms` | Existing any-term/quoted-phrase BM25 behaviour. Author names and years in `query` remain text terms. |
| REST opt-in | `search_mode=bibliographic` | Author/year requests become metadata constraints; optional remaining topic words use BM25 within those constraints. |
| MCP `search` | `search_mode=auto` | Recognises a short name-and-year query against permitted author metadata. Topic queries and exact identifiers remain supported. |
| REST or MCP opt-in | `search_mode=auto` | Same interpretation and ambiguity handling as MCP. |

Explicit `author` and `year` filters work in every mode. If these fields are supplied, `query` is the remaining topic text, not a second copy of the name and year.

```http
GET /v1/articles?query=Akiyama%202025&search_mode=bibliographic&include=frontmatter
GET /v1/articles?author=R%20Akiyama&year=2025&include=frontmatter
GET /v1/articles?author=Akiyama&year=2025&query=aneurysm&include=frontmatter
GET /v1/articles?query=author%3A%22Akiyama%22%20year%3A2025%20aneurysm&search_mode=bibliographic
```

Equivalent MCP calls:

```json
{"name":"search","arguments":{"query":"Akiyama 2025"}}
{"name":"search","arguments":{"author":"Akiyama, R","year":2025,"date_basis":"any"}}
{"name":"search","arguments":{"query":"aneurysm","author":"Akiyama","year":2025}}
```

Simple `search(query)` clients continue to work. MCP still returns `results` containing article IDs, titles and URLs, with complete abstracts in its text response. Bibliographic responses add a structured `interpretation` and a plain-language explanation. Authors and available publication dates are also shown in the text response.

## Interpretation and ambiguity

The parser recognises bounded citation forms such as `Akiyama 2025`, `R Akiyama (2025)` and `Akiyama et al. 2025`. Explicit field syntax is `author:"Name" year:2025`, optionally followed by topic words. Field syntax is interpreted only outside `terms` mode. For complex requests, use the structured author/year parameters.

Auto interpretation checks names only within the permitted collection and other explicit filters. If a name also occurs in a title, abstract or publisher keyword, it may be a topic or eponym; the response asks for clarification. An unknown name-like phrase with no topical evidence also asks for clarification. A phrase found only as a topic keeps term-search semantics, including treating its year as text. Arbitrary natural-language instructions are not parsed by an LLM.

REST reports this under `query.strategy` and `query.interpretation`; MCP reports `interpretation`. A `needs_clarification` response has no hits and asks the caller to choose `bibliographic` or `terms`. It is not evidence that no matching article exists. The demo presents this explicitly.

Once author/year constraints are applied, zero results remain zero. The service does not drop the year, substitute another author or broaden the licensed collection. Filters precede pagination, and changing search mode, date basis, year or author invalidates an existing cursor.

## Names and dates are core source metadata

JATS adapter v6 introduced optional `contributors` and `publication_dates` alongside the compatible `authors` string list and `published_at` primary date. Adapter v7 also recognises untyped people in an explicit author contributor group, a form used by nine OA sources; editor groups and explicit non-author contributors stay excluded. These are publisher-supplied bibliographic facts; future external enrichment can remain a sidecar.

Each contributor retains its display name, given and family names, supplied initials, valid ORCID where present, and whether it is a group author. Search aliases normalize accents, case and punctuation and support name order and given-name initials. Each match must occur within one contributor; parts of different authors cannot be combined. Names are not stemmed or given biomedical spelling substitutions. ORCID is preserved as metadata; ORCID search is not added in this iteration.

Publication dates retain online/print/other kind, source date type, year, and actual day/month/year precision. Received and accepted manuscript dates are excluded. `date_basis` controls the `year` filter:

- `any` (default): primary year or any preserved publisher publication year.
- `online`: an explicitly classified electronic publication date.
- `print`: an explicitly classified print/issue publication date.
- `primary`: the existing `published_at` year.

`published_from` and `published_to` continue to constrain the primary date. Combining a date range and a year requires both conditions to hold. Date-based entitlements also retain their existing primary-date meaning. A year-only source date stays year-only in `publication_dates`; the legacy primary field remains compatible.

## Deployment and evidence

Migration `0023_publication_bibliography.sql` adds two metadata columns to the search projection. Topic FTS fields and weights are unchanged. Existing `normalized_authors_json` stores contributor-specific name aliases, so no new author identity service is required. Older source adapters without structured contributors continue to match their display names literally.

The 100 JNIS sources were reparsed through the dev ingestion workflow using adapter v6; the 25 OA sources were also refreshed with the v7 author-group correction. Both use fresh non-vector index generations. The JNIS v6 records already contain all the new metadata, so they retain their version IDs after the OA correction. Future ingestion uses v7. Stable document IDs and the JNIS customer's frozen collection membership are retained. New canonical versions expose the enriched metadata in article delivery as well as search. No additional source downloads or AI model calls are required.

Acceptance tests cover author aliases, coauthor isolation, both publication years, clarification, wrong years, reference exclusion, customer scope, ordered pagination, and MCP schema validation. The JNIS corpus test checks known-paper recovery against actual publisher XML when those private local files are available. Live/evaluator environments are not deployment targets.

At larger corpus sizes, measure D1 rows read and latency: author matching currently scans normalized JSON aliases within the scoped projection. A dedicated indexed author lookup can be added if profiling warrants it. Corpus-scale ranking quality and ambiguous real-user query evaluation remain ongoing acceptance work.

## Verified examples and demo

The local demo at `http://127.0.0.1:4317/#explorer` includes **Akiyama · 2025**, **Fan · 2024**, and **Kandregula · 2023** presets. Choose **Find a paper** for explicit bibliographic interpretation, or **Auto interpret** to test MCP-style handling. The response banner shows applied constraints or requests clarification. Month-only and year-only source dates keep their precision in the preview.

| Query | Default REST term hits | Bibliographic hit | REST/MCP expected paper in first five |
|---|---:|---|---|
| Akiyama 2025 | 0 | 10.1136/jnis-2024-022527 | Yes |
| Fan 2024 | 2, neither the intended paper | 10.1136/jnis-2023-020988 | Yes |
| Kandregula 2023 | 6, none the intended paper | 10.1136/jnis-2022-019767 | Yes |

The full Worker suite passes 327 tests across 45 files. Local corpus acceptance recovers all 100 JNIS articles using first-contributor surname and primary year in bibliographic mode, with all 100 expected papers in the first five results. A further sample covers 20 initial/name aliases and 20 coauthor requests. This is a bounded known-paper test, not a claim about general search relevance or full-corpus performance.

The deployed API passed 23 checks, including all three examples in REST and MCP, wrong-year constraints, ambiguous inputs, online versus print years, enriched article delivery, and the JNIS access boundary. All 100 deployed JNIS bibliographies also match the final parser output for authors, contributors, publication dates, primary date, title and complete abstract. Non-secret evidence is retained under `deploy/verification-bibliographic-2026-09-18.json` and `deploy/verification-jnis-bibliographic-source-2026-09-18.json`.

Ten further dev checks compare all 25 OA bibliographies with source XML and recover each of the nine author-group cases. D1 verification confirms 125 current JATS articles with contributors and publication dates, completed ingestion jobs, and no vector or managed-index items in their generations. Release `jats-bibliographic-dev-v2` is recorded in `deploy/releases/jats-bibliographic-dev-v2.json`; live, evaluator and audit Worker versions were verified unchanged. The working tree remains uncommitted, with a private source archive recorded in the release manifest. Code rollback and data rollback remain separate operations; no rollback rehearsal was performed in this iteration.
