Skip to content

Commit

Permalink
fix genre
Browse files Browse the repository at this point in the history
  • Loading branch information
ericjeangirard committed Feb 7, 2024
1 parent d99b418 commit 34a7b7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/utils/works.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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;
};
Expand Down

0 comments on commit 34a7b7d

Please sign in to comment.