From 6863f9ec64af7f9cf079150f3a798d7fe75b9045 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 13 May 2024 12:10:34 -0300 Subject: search: drop currently unused search specs --- src/util/search-spec.js | 116 ------------------------------------------------ 1 file changed, 116 deletions(-) diff --git a/src/util/search-spec.js b/src/util/search-spec.js index 7e5b2b63..4a112a22 100644 --- a/src/util/search-spec.js +++ b/src/util/search-spec.js @@ -180,122 +180,6 @@ export const searchSpec = { 'color', ], }, - - albums: { - query: ({albumData}) => albumData, - - process: (album) => ({ - name: - album.name, - - groups: - album.groups.map(group => group.name), - }), - - index: [ - 'name', - 'groups', - ], - }, - - tracks: { - query: ({trackData}) => trackData, - - process: (track, opts) => ({ - name: - track.name, - - color: - track.color, - - album: - track.album.name, - - albumDirectory: - track.album.directory, - - artists: - track.artistContribs - .map(contrib => contrib.artist) - .flatMap(artist => [artist.name, ...artist.aliasNames]), - - additionalNames: - track.additionalNames - .map(entry => entry.name), - - artwork: - prepareArtwork(track, opts), - }), - - index: [ - 'name', - 'album', - 'artists', - 'additionalNames', - ], - - store: [ - 'color', - 'name', - 'albumDirectory', - 'artwork', - ], - }, - - artists: { - query: ({artistData}) => - artistData - .filter(artist => !artist.isAlias), - - process: (artist) => ({ - names: - [artist.name, ...artist.aliasNames], - }), - - index: [ - 'names', - ], - }, - - groups: { - query: ({groupData}) => groupData, - - process: (group) => ({ - names: group.name, - description: group.description, - // category: group.category - }), - - index: [ - 'name', - 'description', - // 'category', - ], - }, - - flashes: { - query: ({flashData}) => flashData, - - process: (flash) => ({ - name: - flash.name, - - tracks: - flash.featuredTracks - .map(track => track.name), - - contributors: - flash.contributorContribs - .map(contrib => contrib.artist) - .flatMap(artist => [artist.name, ...artist.aliasNames]), - }), - - index: [ - 'name', - 'tracks', - 'contributors', - ], - }, }; export function makeSearchIndex(descriptor, {FlexSearch}) { -- cgit 1.3.0-6-gf8a5