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:03:33 +0000 (16:03 -0400)
commit94666e2bfaeac14131ccc1686160665e77051d4a
treebd601ea804721343fa23d490d58373d653a34bfb
parent0e9aee600510e8e978ca625cea4a13337d0f2dbb
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]