Attempt to fix filtering news with ignored genres

parent 4ac7803d
......@@ -227,7 +227,7 @@ export class NewsService {
context.genres = [context.genres];
}
if (Array.isArray(context.genres) && context.genres.length > 0) {
genresFilter = 'OPTIONAL { ?s rnews:genre ?genre . } FILTER (?genre NOT IN(' + context.genres.map(genre => JSON.stringify(genre) + ' ') + '))';
genresFilter = '?s rnews:genre ?genre . FILTER (?genre NOT IN(' + context.genres.map(genre => `<http://cv.iptc.org/newscodes/genre/${genre}>`) + '))';
}
// Date filter
......
......@@ -12,7 +12,7 @@ export class SearchService {
searchParams: NewsContext = {
annotations: [],
genres: [
genres: [ // ignored genres
'Program',
'Advisory',
'Update'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment