Skip to content

Spec 016 T013: the search answers in the contract - #702

Closed
adamjohnwright wants to merge 2 commits into
mainfrom
spec016/t013-results-v2
Closed

adamjohnwright wants to merge 2 commits into
mainfrom
spec016/t013-results-v2

Conversation

@adamjohnwright

@adamjohnwright adamjohnwright commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Replaces #700, with its review's finding fixed (second commit). That review compared node with Java's own service live and found no answer changed. It did find my reason for the matches failure wrong: SolrJ does not unbox a grouping's matches. QueryResponse.extractGroupedInfo skips a grouping without them (I read it in the bytecode, ifnonnull … goto), and the converter reads the first grouping kept. So the service now reads the first grouping that has its matches, and none is no result. That is the same 500 for the one grouping this index asks for, and the right reading where several are answered. A spec of two groupings, the first without matches, fails on #700's reading and passes now. Redeployed on beta: 68 search answers identical, no errors.

The search family's answers in the contract (spec 016 T013). With #691 and #697 this brings every search route's known problems to zero, from 11,452 before spec 016.

Contract types: ResultGroup<Entry>, GroupedResult<Entry>, DiagramResult<Entry>, TargetResult and IconResult. Each takes its entry type as a named argument: the service writes them with its WrittenEntry, and the site and the pathway browser read them with the view.

What is written, typed as written:

  • A group's entries is optional: an ungrouped page past the end has none.
  • So is its typeName: a group Solr names with nothing has none.
  • A target's empty term or resource is left out, so both are optional.

Writers:

  • searchResult, groupedEntries and the diagram search's entriesResult return the contract's types.
  • A grouping without matches is skipped, as SolrJ skips it (see above); one without ngroups stays Java's 500, as GroupedResult unboxes it. Specs cover both.

Readers:

  • The site's SearchResult and IconResult, and the pathway browser's Search.Result and Search.Icon.Result, are the contract's.
  • The search page settles a group's entries and name once, when the answer arrives (ShownGroup), and reads them as before.
  • The pathway browser's search shows only named type facets, as the site's does.
  • The icon tooltip takes iconName, never highlighted (from Spec 016, from #691's review: a highlighted identifier shown as text #697's review).

Checks:

  • Known problems: 0 on the search routes; 12,164 overall.
  • 206 unit tests pass, and 92 end-to-end tests (search, search errors, React-to-Me, in-diagram search, flagging, pathway browser, entity popup, pathway data, icon library, interactor).
  • On beta, with this branch's content service deployed: 68 search answers identical in status, type and body, and express still 5.3.0.
  • Lint and dead code are at their baselines, and preflight passes.

🤖 Generated with Claude Code

adamjohnwright and others added 2 commits October 27, 2026 00:36
ResultGroup, GroupedResult, DiagramResult, TargetResult and IconResult,
each taking its entry type as an argument: the service writes them with
the entries it builds, the site and the pathway browser read them with the
view. A group's entries and type name are optional, as the service leaves
them out at times; the search page settles both once on arrival, and the
pathway browser shows only named type facets, as the site does. Solr's
grouping without matches is Java's 500, as one without ngroups was.

The search routes' known problems are 0 (from 11,452 before spec 016);
the whole is 12,164.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ads it

SolrJ does not unbox a grouping's matches: extractGroupedInfo skips a
grouping that has none (its bytecode), and the converter reads the first
grouping it kept. So the service reads the first grouping with matches,
and none is no result -- the same 500 for the one grouping this index
asks for, and the right one where several are answered. The comment, the
spec and tasks.md said SolrJ unboxes it; they say what it does now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright

Copy link
Copy Markdown
Contributor Author

Replaced by 703: the same commits, rebased onto main after #701.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant