Skip to content

fix(search): include reaction definitions in quick search - #239

Merged
samseaver merged 3 commits into
ModelSEED:stagingfrom
VibhavSetlur:fix/rxn-definition-search-field
Sep 8, 2026
Merged

fix(search): include reaction definitions in quick search#239
samseaver merged 3 commits into
ModelSEED:stagingfrom
VibhavSetlur:fix/rxn-definition-search-field

Conversation

@VibhavSetlur

@VibhavSetlur VibhavSetlur commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • establish a schema-aware reaction-search contract: legacy Solr keeps flat stoichiometry/equation searches, while nested Solr parent-scopes result documents and block-joins child compound/participant_name matches
  • quick search covers IDs, names, Equation (definition), status, EC numbers, aliases, pathways, notes, and stoichiometry; terms are escaped before generated wildcards
  • harden findReactionsForCompound, URL encoding for query fields/sorts, and successful malformed-Solr-response handling without masking HTTP errors

Regression matrix

Decoded request assertions cover legacy and nested schemas; one/multiple quick terms with AND/OR; empty and intentional wildcard queries; prefix threshold; special-character/space escaping; Equation compound ID/name lookup; parent scoping; explicit string/boolean/numeric filters and OR composition; filter + quick search; queryColumn; direct query; pagination/sort/visible fields; schema detection/cache/failure; endpoint routing; and preserved compound batch behavior.

Live reproduction

Manual unauthenticated probes on 2026-09-08: staging.modelseed.org/solr/reactions_staging rejects doc_type (HTTP 400), proving the legacy path; modelseed.org/solr/reactions_staging accepts parent doc_type:reaction and the established {!parent ... doc_type:stoichiometry ...} join (HTTP 200). Browser/Vitest live integration is CORS-blocked (403 OPTIONS), so contract coverage is deterministic request-level tests.

Verification

  • npx vitest run tests/unit/api/biochemStoichiometry.test.ts tests/unit/api/biochem.test.ts tests/unit/api/solrSchema.test.ts
  • npm run lint
  • npx tsc --noEmit
  • npm run test:run
  • npm run build
  • npm audit --omit=dev --audit-level=high
  • git diff --check

@VibhavSetlur

Copy link
Copy Markdown
Collaborator Author

Hardened after full reaction-search audit in be416cc. The PR description now records the complete decoded-request regression matrix and live schema probes (staging legacy vs production nested), plus the browser CORS limitation and deterministic test coverage.

@samseaver
samseaver merged commit 04a1c83 into ModelSEED:staging Sep 8, 2026
2 checks passed
@samseaver
samseaver deleted the fix/rxn-definition-search-field branch September 8, 2026 14:31
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.

2 participants