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 16:14:03 +0000 (12:14 -0400)
commita2e0678b2899603e51b28321c459b4597c28a2ce
treecfb6a134e9f6fb4757742ad85e7fdcac1e461f2c
parentd683e81e2068da3e54ee7165b3c01d7d46fc2c79
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]