fix(search): server-side type filter so --max applies after --type#126
Open
frd1201 wants to merge 2 commits into
Open
fix(search): server-side type filter so --max applies after --type#126frd1201 wants to merge 2 commits into
frd1201 wants to merge 2 commits into
Conversation
…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>
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
vsp search "Z*" --type CLAS --max 50returned fewer results than expected (issue #119).The ADT server returned up to
--maxmixed-type objects, and--typewas applied client-side afterwards — so any CLAS objects outside the first 50 mixed results were silently dropped.Solution
Add
SearchObjectByTypethat passesobjectTypeto the ADTinformationsystem/searchendpoint so the server filters before applyingmaxResults.SearchObjectbecomes 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.) viacanonicalObjectType.--verboseprints the effective query for debugging.Test plan
vsp search "Z*" --type CLAS --max 50returns up to 50 CLAS objectsvsp search "Z*"(no--type) still works unchangedpkg/adt/client_test.gopassCloses #119