Help us shape the future of Go! Take the 2026 Go Developer Survey

1-batch-by-id

command
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Command spike1 tests whether OpenAlex works can be fetched in batches by ID.

Spike 1 of docs/ARCHITECTURE_PHASE1.md §9. ADR-002's cost model rests on this entirely: a list request costs 10 credits and returns up to 50 works (0.20 credits/work), against 1 credit for a single work (1.00 credits/work). If filtering by a pipe-separated list of OpenAlex IDs does not work, batching collapses, expansion costs 5x more, and the fallback is batching by DOI — which silently drops every work that has none.

Measures three things:

  1. Does filter=openalex_id:W1|W2|... work at all, and does ids.openalex: too?
  2. What is the ceiling on the number of piped values — 50, 100, or higher?
  3. Does referenced_works arrive complete inside a batched list response? ("edges arrive free" is the premise of the whole expansion algorithm)

Usage:

go run ./spikes/1-batch-by-id

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL