LP#2004055: Simpler Display Field highlighting
authorMike Rylander <mrylander@gmail.com>
Thu, 6 Apr 2023 20:18:56 +0000 (16:18 -0400)
committerJason Boyer <JBoyer@equinoxOLI.org>
Wed, 17 May 2023 20:28:51 +0000 (16:28 -0400)
commita0f2fd474a2ae869ac3c82388439668fe0871225
treebe9cc6ee63428d0c88ac770c6f8647fa777c1689
parent870f3e9695c19022a931623569c31284116f1790
LP#2004055: Simpler Display Field highlighting

This commit uses database functions to precompute the normalized and
tokenized tsquery required for highlighting before it is returned to the
user, and disallows highlight-time compilation of the highlight map.
The primary purpose of this is to avoid the chance for user input to
find its way directly into SQL statements, but an additional benefit is
that it becomes much simpler for high level application code to make use
of Display Field highlighting in non-search contexts.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>
Open-ILS/src/eg2/src/app/share/catalog/catalog.service.ts
Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm
Open-ILS/src/sql/Pg/300.schema.staged_search.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.function.safer_highlight.sql [new file with mode: 0644]