From 34a7b7dfb314a07bdf5141cdeec6d0a3be533129 Mon Sep 17 00:00:00 2001 From: eric Date: Wed, 7 Feb 2024 13:27:34 +0100 Subject: [PATCH] fix genre --- server/src/utils/works.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/utils/works.js b/server/src/utils/works.js index 6d5ff536..65ff16c2 100644 --- a/server/src/utils/works.js +++ b/server/src/utils/works.js @@ -34,7 +34,7 @@ const getFosmQuery = (options, pit, searchAfter) => { }); query.query.bool.must.push({ range: { year: { gte: options.year, lte: options.year } } }); // Exclude files for Datacite - query.query.bool.must_not.push({ terms: { genre: ['file', 'version'] } }); + query.query.bool.must_not.push({ terms: { genre: ['file', 'version', 'file_'] } }); query.query.bool.minimum_should_match = 1; query._source = [ 'affiliations', 'authors', 'doi', 'external_ids', 'genre', 'genre_raw', 'hal_id', 'id', 'publisher', @@ -49,7 +49,7 @@ const getFosmQuery = (options, pit, searchAfter) => { query.track_total_hits = false; } if (options.datasets) { - query.query.bool.must.push({ term: { genre_raw: 'dataset' } }); + query.query.bool.must.push({ term: { genre: 'dataset' } }); } return query; };