diff --git a/lxl-web/src/routes/api/[[lang=lang]]/supersearch/getEditedPartEntries.test.ts b/lxl-web/src/routes/api/[[lang=lang]]/supersearch/getEditedPartEntries.test.ts index 7eb524bf3..6ad409520 100644 --- a/lxl-web/src/routes/api/[[lang=lang]]/supersearch/getEditedPartEntries.test.ts +++ b/lxl-web/src/routes/api/[[lang=lang]]/supersearch/getEditedPartEntries.test.ts @@ -3,14 +3,14 @@ import getEditedPartEntries from './getEditedPartEntries'; describe('getEditedPartEntries', () => { it('narrows down search query when editing qualifier parts', () => { - expect(getEditedPartEntries('hello title:"hej"', 16)).toEqual([['_q', 'title:"hej"']]); + expect(getEditedPartEntries('hello title:"hej"', 16)).toEqual([['_qualifier', 'title:"hej"']]); }); it('keeps query as is when editing year qualifiers', () => { expect(getEditedPartEntries('hello ÅR:2024', 13)).toEqual([]); }); it('narrows down search query by base class for query codes', () => { expect(getEditedPartEntries('astrid lindgren subject:"winter"', 27)).toEqual([ - ['_q', `"rdf:type":Topic "winter"`], + ['_qualifier', `"rdf:type":Topic "winter"`], ['min-reverseLinks.totalItems', '1'] ]); }); diff --git a/lxl-web/src/routes/api/[[lang=lang]]/supersearch/getEditedPartEntries.ts b/lxl-web/src/routes/api/[[lang=lang]]/supersearch/getEditedPartEntries.ts index 745fd561b..ca5f03570 100644 --- a/lxl-web/src/routes/api/[[lang=lang]]/supersearch/getEditedPartEntries.ts +++ b/lxl-web/src/routes/api/[[lang=lang]]/supersearch/getEditedPartEntries.ts @@ -48,12 +48,12 @@ function getEditedPartEntries(query: string, cursor: number): [string, string][] if (baseClass) { return [ - ['_q', `"rdf:type":${baseClass} ${qualifierValue}`], + ['_qualifier', `"rdf:type":${baseClass} ${qualifierValue}`], ['min-reverseLinks.totalItems', '1'] // ensure results are linked/used atleast once ]; } - return [['_q', qualifierKey + qualifierOperator + qualifierValue]]; + return [['_qualifier', qualifierKey + qualifierOperator + qualifierValue]]; } /**