From 073d6c876975f0f87a8612842a56012d4a85d637 Mon Sep 17 00:00:00 2001 From: HeNine <> Date: Sun, 14 Nov 2021 14:22:56 +0100 Subject: [PATCH] improved display when speakers are set but line isn't --- buscribe_data.sql | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/buscribe_data.sql b/buscribe_data.sql index e3dfbf7..ee74263 100644 --- a/buscribe_data.sql +++ b/buscribe_data.sql @@ -83,12 +83,13 @@ CREATE VIEW buscribe_all_transcriptions AS SELECT buscribe_transcriptions.id, start_time, end_time, - coalesce(buscribe_verified_lines.verifier, speakers.verifier) AS verifier, + coalesce(buscribe_verified_lines.verifier, speakers.verifier) AS verifier, names, - verified_line AS transcription_line, - setweight(to_tsvector('english', verified_line), 'C') AS transcription_line_ts, - setweight(to_tsvector(array_to_string(names, ' ')), 'C') AS names_ts, - null AS transcription_json + coalesce(verified_line, buscribe_transcriptions.transcription_line) AS transcription_line, + coalesce(setweight(to_tsvector('english', verified_line), 'C'), + to_tsvector('english', buscribe_transcriptions.transcription_line)) AS transcription_line_ts, + setweight(to_tsvector(array_to_string(names, ' ')), 'C') AS names_ts, + null AS transcription_json FROM buscribe_transcriptions LEFT OUTER JOIN buscribe_verified_lines ON buscribe_transcriptions.id = buscribe_verified_lines.line LEFT OUTER JOIN (