Fix fulltext indexing
parent
0058d37543
commit
b304ddd5bb
|
@ -632,7 +632,7 @@ class Syncer
|
|||
let upd = {
|
||||
body_text: obj.text||'',
|
||||
body_html: obj.html,
|
||||
body_html_text: obj.html.replace(/<style[^>]*>.*<\/style\s*>|<\/?[^>]*>/g, ''),
|
||||
body_html_text: obj.html.replace(/<style[^>]*>[\s\S]*?<\/style\s*>|<\/?[^>]*>/g, ''),
|
||||
};
|
||||
await SQL.update(
|
||||
this.pg, 'messages m', {
|
||||
|
|
|
@ -81,8 +81,8 @@ begin
|
|||
coalesce(msg.props->>'to', '') || ' ' ||
|
||||
coalesce(msg.props->>'cc', '') || ' ' ||
|
||||
coalesce(msg.props->>'bcc', '') || ' ' ||
|
||||
(select string_agg((a->>'name') || ' ' || (a->>'mimetype') || ' ' || (a->>'size'), ' ')
|
||||
from jsonb_array_values(coalesce(msg.props->'attachments', '[]'::jsonb)) as t (a)) || ' ' ||
|
||||
coalesce((select string_agg((a->>'name') || ' ' || (a->>'mimetype') || ' ' || (a->>'size'), ' ')
|
||||
from jsonb_array_elements(coalesce(msg.props->'attachments', '[]'::jsonb)) as t (a)), '') || ' ' ||
|
||||
msg.subject,
|
||||
'\W+', ' ', 'g'
|
||||
)), 'A')
|
||||
|
|
Loading…
Reference in New Issue