Remove standard: search operator#2844
Open
bendichter wants to merge 3 commits into
Open
Conversation
The `standard:` operator matched `$.dataStandard[*].name` against asset metadata, but `dataStandard` is reported on the Version's assetsSummary, not on individual assets — so it never matched and always returned 0 results in production. Match `standard:` against the Version metadata (`$.assetsSummary.dataStandard[*].name`) instead, restricting the dandiset queryset to dandisets with a matching version. The existing test was rewritten to seed `dataStandard` on the version assetsSummary (where it actually lives) rather than on the asset. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
|
rebase/merge -- I fixed up frontend e2e testing |
The standard: operator never worked reliably against real data and isn't providing enough value to keep. Remove it from the parser operator set, filter logic, API help text, and frontend examples. Can be re-added later once it's matched against the right metadata source. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
standard: search operator (matches version dataStandard)standard: search operator
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.
Summary
The
standard:search operator (e.g.standard:NWB) never returned results against real data, and it isn't providing enough value to justify keeping a half-working operator around. This PR removesstandard:entirely. It can be re-added later, wired to the correct metadata source.Why it was broken
standard:matched$.dataStandard[*].nameagainst asset metadata, but assets don't carry adataStandardfield — the data standard is reported on the Version'sassetsSummary.dataStandard, so the jsonpath never matched.Verified against the sandbox API:
standard:nwb/standard:NWB→ 0 resultsspecies:mouse→ 134,technique:two-photon→ 12)Rather than relocate it to match the version metadata, we're dropping it for now since it's low-value, and re-introducing it cleanly later is straightforward.
Changes
parser.py— removedstandardfromOPERATOR_KEYS; an unknownstandard:token now falls through to the standard 400 + "did you mean?" handling.filters.py— removedstandardfrom_ASSET_OPS/_NAME_PATH_OPS, and reverted_jsonpath_name_matchto its single-column form (the column generalization existed only to servestandard).serializers.py— droppedstandardfrom the API search help text.DandisetSearchField.vue— removed thestandard:nwbexample from the frontend operator hints.test_dandiset.py— removedtest_advanced_search_standard_matchesand the now-unusedversion_metadataparam on the_seed_dandiset_with_assethelper.Testing
ruff checkpasses on the changed files. The remaining search operator tests (species/approach/technique/file_type+ the unknown-operator suggestion path) are unaffected.🤖 Generated with Claude Code