From: Vincent Vanwaelscappel Date: Wed, 23 Feb 2022 15:02:49 +0000 (+0100) Subject: wip #5122 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a0a6f8092b236934647c92429f18b0c67c09abd0;p=odl.git wip #5122 --- diff --git a/resources/js/search.js b/resources/js/search.js index f562d5e..32a14b2 100644 --- a/resources/js/search.js +++ b/resources/js/search.js @@ -9,7 +9,7 @@ export default () => ({ miniSearch: {}, // Holds the MiniSearch instance setup: { // MiniSearch options: https://lucaong.github.io/minisearch/#search-options fields: ['title', 'text', 'keywords'], // fields to index for full-text search - storeFields: ['id', 'title', 'text', 'type', 'url', 'thumb'], // fields to return with search results + storeFields: ['id', 'displayedTitle', 'text', 'type', 'url', 'thumb'], // fields to return with search results searchOptions: { prefix: true, // Allow partial matches processTerm: (term, _fieldName) => term.length < 3 ? null : term.toLowerCase() @@ -46,7 +46,7 @@ export default () => ({ attributes = '@click.prevent="openPDF($el.attributes.href.value); closeSearch();"'; } - return `${result.title}`; + return `${result.displayedTitle}`; }, get results() {