Class CourtFixtureSource
Backed by the two test corpora published to Maven Central:
ai.pipestream:chunker-pipedocs-court-1000— 1000 docs after the chunker stage (semantic_results filled, no embedding vectors).ai.pipestream:embedder-pipedocs-court-1000— same 1000 docs with embedding vectors attached.
Layout inside both jars: fixtures/court-1000/<stage>/doc_<N>.pb
where <stage> is chunker or embedder and <N>
runs 1..1000. Each file is one PipeDoc encoded as a raw protobuf —
NOT length-delimited, NOT gzipped. PipeDoc.parseFrom(InputStream)
consumes the whole stream.
Used by IndexPushDriver to feed the OSS StreamDocuments
bidi RPC for the OpenSearch indexing test tab. The iterator is single-pass
and lazily opens each resource so a 1000-doc run never holds more than one
doc's worth of bytes in memory at a time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStage selector for the court-1000 corpus. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcount(CourtFixtureSource.Stage stage, int limit) Cheap probe — counts how manydoc_<N>.pbresources are actually present on the classpath for the given stage.Iterator<ai.pipestream.data.v1.PipeDoc> open(CourtFixtureSource.Stage stage, int limit) Open a single-pass iterator over up tolimitPipeDocs from the selected stage.
-
Constructor Details
-
CourtFixtureSource
public CourtFixtureSource()CDI.
-
-
Method Details
-
open
Open a single-pass iterator over up tolimitPipeDocs from the selected stage. Docs are emitted in numeric order (doc_1.pb,doc_2.pb, …) up tolimitor 1000, whichever comes first.The iterator opens each
.pbresource lazily onIterator.next()and closes it before returning the parsed PipeDoc; callers do not need to drain or close the iterator.Missing doc files (gaps in the numbering — the court-1000 jars have them, e.g.
doc_993–doc_998are absent) are skipped silently; the iterator advances to the next present file and keeps going until it has emittedlimitdocs or scanned the full1..1000range.- Parameters:
stage- which corpus to read fromlimit- max number of docs to emit; clamped to[1, 1000]- Returns:
- a single-pass iterator over PipeDocs
-
count
Cheap probe — counts how manydoc_<N>.pbresources are actually present on the classpath for the given stage. Scans the full1..1000range and counts everything that exists, then caps atlimit. Gaps in the numbering are tolerated (court-1000 jars have some) — we don't return early on the first missing index.- Parameters:
stage- which corpus to probelimit- upper bound on the returned count; clamped to[1, 1000]- Returns:
- number of resources present, in
[0, limit]
-