diff --git a/nomad/app/api/upload.py b/nomad/app/api/upload.py index 2e2f8f687483286fbc1678266bbff8c9bfbba076..649e4517ccb6e9c68fb2caf986a117f01769b89a 100644 --- a/nomad/app/api/upload.py +++ b/nomad/app/api/upload.py @@ -222,7 +222,6 @@ class UploadListResource(Resource): pagination=dict(total=total, page=page, per_page=per_page), results=results), 200 - @api.doc(security=list(api.authorizations.keys())) # weird bug, this should not be necessary @api.doc('upload') @api.expect(upload_metadata_parser) @api.response(400, 'To many uploads') diff --git a/ops/scripts/misc.http b/ops/scripts/misc.http index cf582592ec9f3dd2ad0188106a14b33b7030ee45..41a2a93d8582f4d891215bff47405ec57ec4da4e 100644 --- a/ops/scripts/misc.http +++ b/ops/scripts/misc.http @@ -90,7 +90,7 @@ Content-Type: application/json } ### -# Search migration unpublished calcs +# Search GET http://localhost:19200/fairdi_nomad_prod/_search HTTP/1.1 Content-Type: application/json @@ -113,6 +113,38 @@ Content-Type: application/json } } +### +# Search test + +GET http://localhost:9200/test_nomad_fairdi_0_6/_search HTTP/1.1 +Content-Type: application/json + +{ + "query": { + "bool": { + "should": [ + { + "bool": { + "must": [ + { + "term": { + "published": true + } + }, + { + "term": { + "with_embargo": false + } + } + ] + } + } + ], + "minimum_should_match": 1 + } + } +} + ### # Disable refresh and replica for fast index PUT http://localhost:19200/fairdi_nomad_prod/_settings HTTP/1.1 diff --git a/tests/app/test_api.py b/tests/app/test_api.py index fc5516db179cdf20f48c7935489f9a5d2e9b3861..160257abaaf2471f89236a9d827d6e530c08fada 100644 --- a/tests/app/test_api.py +++ b/tests/app/test_api.py @@ -722,7 +722,7 @@ class TestRepo(): (1, 'only_atoms', ['Br', 'K', 'Si'], 'test_user'), (1, 'only_atoms', ['Br', 'Si', 'K'], 'test_user'), (1, 'comment', 'specific', 'test_user'), - (1, 'authors', 'Hofstadter, Leonard', 'test_user'), + (1, 'authors', 'Leonard Hofstadter', 'test_user'), (2, 'files', 'test/mainfile.txt', 'test_user'), (2, 'paths', 'mainfile.txt', 'test_user'), (2, 'paths', 'test', 'test_user'),