Skip to content

fix(search): server-side type filter so --max applies after --type#126

Open
frd1201 wants to merge 2 commits into
oisee:mainfrom
frd1201:fix/search-type-filter-issue-119
Open

fix(search): server-side type filter so --max applies after --type#126
frd1201 wants to merge 2 commits into
oisee:mainfrom
frd1201:fix/search-type-filter-issue-119

Conversation

@frd1201
Copy link
Copy Markdown

@frd1201 frd1201 commented May 1, 2026

Problem

vsp search "Z*" --type CLAS --max 50 returned fewer results than expected (issue #119).

The ADT server returned up to --max mixed-type objects, and --type was applied client-side afterwards — so any CLAS objects outside the first 50 mixed results were silently dropped.

Solution

Add SearchObjectByType that passes objectType to the ADT informationsystem/search endpoint so the server filters before applying maxResults. SearchObject becomes a thin shim, leaving all existing callers untouched.

Short-form types are canonicalized at the CLI boundary (CLAS→CLAS/OC, INTF→INTF/OI, PROG→PROG/P, etc.) via canonicalObjectType. --verbose prints the effective query for debugging.

Test plan

  • vsp search "Z*" --type CLAS --max 50 returns up to 50 CLAS objects
  • vsp search "Z*" (no --type) still works unchanged
  • Unit tests in pkg/adt/client_test.go pass

Closes #119

claude and others added 2 commits May 1, 2026 08:51
…pe filter

vsp search "Z*" --type CLAS --max 50 returned only 9 results (issue oisee#119)
because --type was applied client-side after the request. The ADT API
returned up to 50 mixed-type Z* objects and the CLI then kept only CLAS
rows, so any classes outside the first 50 mixed results were silently
dropped.

Add SearchObjectByType that sends objectType on the informationsystem/
search endpoint; SearchObject becomes a thin shim, leaving the other 33
existing callers untouched. In runSearch, canonicalize the documented
short forms (CLAS→CLAS/OC, INTF→INTF/OI, ...) at the CLI boundary and
print the effective query when --verbose is set.
…ee#121

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Bug in CLI vsp search

2 participants