Skip to content

Add standard: search operator; remove file_type: - #2884

Open
bendichter wants to merge 1 commit into
masterfrom
search-operator-standard
Open

Add standard: search operator; remove file_type:#2884
bendichter wants to merge 1 commit into
masterfrom
search-operator-standard

Conversation

@bendichter

Copy link
Copy Markdown
Member

Follow-up to #2882, which was pared down per review to just the performance fix. This PR carries the operator-set changes that were split out of it, and is stacked on that branch.

Re-Adding standard:

standard: was removed in 05fda3c pending a decision on the right metadata source. That decision is now made: it matches assetsSummary.dataStandard, the same version-level aggregation that #2882 pointed the other operators at. Real entries are names like "Neurodata Without Borders (NWB)" and "Brain Imaging Data Structure (BIDS)", so standard:nwb and standard:bids match by substring. Against production metadata, standard:nwb returns 137 dandisets and standard:bids returns 8.

Removing file_type:

Its remaining value is covered by standard:, and AssetsSummary has no encodingFormat or MIME field, so keeping it would have meant keeping the per-asset AssetSearch scan that #2882 moved the other operators off of. Dropping it takes AssetSearch out of this code path entirely, which in turn lets apply_search_filters drop its user parameter: the remaining filters only ever narrow the caller's queryset, and detail routes re-check embargo_status in get_object before returning anything.

There is no close-enough key for the parser's generic "did you mean" suggestion to fire on file_type (the best ratio is modified_after at 0.52), so it now gets an explicit 400 pointing at standard: and the file type filter in the search sidebar, with a test pinning that message.

This removes only the search operator. The faceted file_type query parameter on DandisetSearchQueryParameterSerializer is a separate feature and is untouched.

🤖 Generated with Claude Code

@bendichter
bendichter force-pushed the search-operators-use-assets-summary branch from 884d1e9 to b1db40f Compare August 7, 2026 15:36
@bendichter bendichter closed this Aug 7, 2026
@bendichter bendichter reopened this Aug 7, 2026
Base automatically changed from search-operators-use-assets-summary to master August 12, 2026 13:16
standard: matches assetsSummary.dataStandard, the version-level roll-up
of the data standards used by a dandiset's assets (e.g. NWB, BIDS). It
was removed in 05fda3c pending a decision on the right metadata
source; that decision is now made.

file_type: is removed. Its remaining value is covered by standard:, and
AssetsSummary has no encodingFormat or MIME field, so keeping it would
have meant keeping the per-asset AssetSearch scan that the previous
commit moved the other operators off of. Dropping it takes AssetSearch
out of this code path entirely, which also lets apply_search_filters
drop its user parameter: the remaining filters only ever narrow the
caller's queryset, and detail routes re-check embargo_status in
get_object. Since there is no close-enough operator for the generic
"did you mean" suggestion to fire, file_type: now gets an explicit 400
pointing at standard: and the file type filter in the search sidebar.
The faceted file_type query parameter is a separate feature and is
untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bendichter
bendichter force-pushed the search-operator-standard branch from 35a0e2e to b9413f5 Compare August 14, 2026 20:57
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