mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Text parser rewritten:
- supports multibyte encodings - more strict rules for lexemes - flex isn't used Add: - tsquery plainto_tsquery(text) Function makes tsquery from plain text. - &&, ||, !! operation for tsquery for combining tsquery from it's parts: 'foo & bar' || 'asd' => 'foo & bar | asd'
This commit is contained in:
@ -173,6 +173,13 @@ select to_tsquery('default', 'asd&(and|fghj)');
|
||||
select to_tsquery('default', '(asd&and)|fghj');
|
||||
select to_tsquery('default', '(asd&!and)|fghj');
|
||||
select to_tsquery('default', '(the|and&(i&1))&fghj');
|
||||
|
||||
select plainto_tsquery('default', 'the and z 1))& fghj');
|
||||
select plainto_tsquery('default', 'foo bar') && plainto_tsquery('default', 'asd');
|
||||
select plainto_tsquery('default', 'foo bar') || plainto_tsquery('default', 'asd fg');
|
||||
select plainto_tsquery('default', 'foo bar') || !!plainto_tsquery('default', 'asd fg');
|
||||
select plainto_tsquery('default', 'foo bar') && 'asd | fg';
|
||||
|
||||
select 'a b:89 ca:23A,64b d:34c'::tsvector @@ 'd:AC & ca';
|
||||
select 'a b:89 ca:23A,64b d:34c'::tsvector @@ 'd:AC & ca:B';
|
||||
select 'a b:89 ca:23A,64b d:34c'::tsvector @@ 'd:AC & ca:A';
|
||||
|
Reference in New Issue
Block a user