diff --git a/dandiapi/api/services/search/filters.py b/dandiapi/api/services/search/filters.py index db3c0cf7c..989a290af 100644 --- a/dandiapi/api/services/search/filters.py +++ b/dandiapi/api/services/search/filters.py @@ -38,7 +38,7 @@ 'published_after', } ) -_ASSET_OPS = frozenset({'species', 'approach', 'technique', 'standard', 'file_type'}) +_ASSET_OPS = frozenset({'species', 'approach', 'technique', 'file_type'}) def _annotate_latest_version_modified(queryset): @@ -68,7 +68,6 @@ def _annotate_latest_published_created(queryset): 'species': '$.wasAttributedTo[*].species.name', 'approach': '$.approach[*].name', 'technique': '$.measurementTechnique[*].name', - 'standard': '$.dataStandard[*].name', } @@ -178,7 +177,7 @@ def apply_search_filters( if asset_qs is not None: # NOTE perf: jsonb_path_exists with a runtime-built jsonpath cannot # use the existing per-field GIN indexes; the path-scan operators - # (species/approach/technique/standard) currently sequential-scan the + # (species/approach/technique) currently sequential-scan the # asset_search materialized view. The view is small enough today # (~one row per asset) that this is acceptable, but if it becomes a # hot path the fix is expression GIN indexes on each path or diff --git a/dandiapi/api/services/search/parser.py b/dandiapi/api/services/search/parser.py index 817642341..7432a5bfe 100644 --- a/dandiapi/api/services/search/parser.py +++ b/dandiapi/api/services/search/parser.py @@ -29,7 +29,6 @@ 'species', 'approach', 'technique', - 'standard', 'file_type', } ) diff --git a/dandiapi/api/tests/test_dandiset.py b/dandiapi/api/tests/test_dandiset.py index 712399fc3..628d68a67 100644 --- a/dandiapi/api/tests/test_dandiset.py +++ b/dandiapi/api/tests/test_dandiset.py @@ -1969,21 +1969,6 @@ def test_advanced_search_technique_with_quoted_phrase(api_client): assert _search_ids(api_client, 'technique:surgical') == {surg.identifier} -@pytest.mark.ai_generated -@pytest.mark.django_db -def test_advanced_search_standard_matches(api_client): - nwb = _seed_dandiset_with_asset( - asset_metadata={'dataStandard': [{'name': 'Neurodata Without Borders (NWB)'}]}, - ) - bids = _seed_dandiset_with_asset( - asset_metadata={'dataStandard': [{'name': 'Brain Imaging Data Structure (BIDS)'}]}, - ) - _refresh_asset_search() - - assert _search_ids(api_client, 'standard:NWB') == {nwb.identifier} - assert _search_ids(api_client, 'standard:BIDS') == {bids.identifier} - - @pytest.mark.ai_generated @pytest.mark.django_db def test_advanced_search_file_type_alias_and_mime(api_client): diff --git a/dandiapi/api/views/serializers.py b/dandiapi/api/views/serializers.py index 0d64477c8..cbfdd76c8 100644 --- a/dandiapi/api/views/serializers.py +++ b/dandiapi/api/views/serializers.py @@ -309,7 +309,7 @@ class DandisetQueryParameterSerializer(serializers.Serializer): 'Available operators: ' 'created_before, created_after, modified_before, modified_after, ' 'published_before, published_after (all take YYYY-MM-DD); ' - 'species, approach, technique, standard (case-insensitive ' + 'species, approach, technique (case-insensitive ' 'substring against the corresponding asset_metadata array); ' 'file_type (nwb, image, text, video — or any MIME prefix). ' 'Invalid syntax returns HTTP 400 with the offending token; ' diff --git a/web/src/components/DandisetSearchField.vue b/web/src/components/DandisetSearchField.vue index 5b3b5a6db..629b80cd2 100644 --- a/web/src/components/DandisetSearchField.vue +++ b/web/src/components/DandisetSearchField.vue @@ -93,7 +93,6 @@ const operatorHelp = [ { example: 'species:mouse', description: 'Has assets attributed to a species' }, { example: 'approach:electrophysiology', description: 'Has assets using an approach' }, { example: 'technique:"patch clamp"', description: 'Has assets using a measurement technique' }, - { example: 'standard:nwb', description: 'Has assets in a data standard' }, { example: 'file_type:nwb', description: 'Has assets of a file type (nwb, image, text, video)' }, ];