Postgresql 博士后FTS。调整解析行为
问题是关于FTS配置Postgresql 博士后FTS。调整解析行为,postgresql,Postgresql,问题是关于FTS配置 SELECT * FROM ts_debug('english', '1056 01:31:06,375 --> 01:31:11,004 I hear it. I think there''s some guys coming this way, a lot of them. 1057 01:31:11,172 --> 01:31:12,678 We gotta get out of here.'); 我有很多连续剧的字幕,其中包含了这个短语发生的
SELECT * FROM ts_debug('english',
'1056
01:31:06,375 --> 01:31:11,004
I hear it. I think there''s some guys
coming this way, a lot of them.
1057
01:31:11,172 --> 01:31:12,678
We gotta get out of here.');
我有很多连续剧的字幕,其中包含了这个短语发生的时间间隔,比如
01:31:06,375 --> 01:31:11,004.
当FTS解析文本时,它将整个间隔分离为单个整数,如上面的示例所示
有没有办法让FTS将此间隔解析为间隔或至少解析为2个时间戳?使用
regexp_replace(searchstring, '(\d\d):(\d\d):(\d\d),(\d\d\d)', '\1\2\3\4', 'g')
然后01:31:12678
将转到013112678
,这将与全文搜索配合使用