Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 02b3890

Browse files
author
Aleksandr Parfenov
committed
Add a FTS Config test to unaccent contrib
1 parent 427fe8d commit 02b3890

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

contrib/unaccent/expected/unaccent.out

+11
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,14 @@ SELECT ts_lexize('unaccent', '
6161
{����}
6262
(1 row)
6363

64+
CREATE TEXT SEARCH CONFIGURATION unaccent(
65+
COPY=russian
66+
);
67+
ALTER TEXT SEARCH CONFIGURATION unaccent ALTER MAPPING FOR
68+
asciiword, word WITH unaccent MAP russian_stem;
69+
SELECT to_tsvector('unaccent', 'foobar ����� ����');
70+
to_tsvector
71+
------------------------------
72+
'foobar':1 '�����':2 '���':3
73+
(1 row)
74+

contrib/unaccent/sql/unaccent.sql

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ CREATE EXTENSION unaccent;
22

33
-- must have a UTF8 database
44
SELECT getdatabaseencoding();
5-
65
SET client_encoding TO 'KOI8';
76

87
SELECT unaccent('foobar');
@@ -16,3 +15,12 @@ SELECT unaccent('unaccent', '
1615
SELECT ts_lexize('unaccent', 'foobar');
1716
SELECT ts_lexize('unaccent', '£ÌËÁ');
1817
SELECT ts_lexize('unaccent', '³öéë');
18+
19+
CREATE TEXT SEARCH CONFIGURATION unaccent(
20+
COPY=russian
21+
);
22+
23+
ALTER TEXT SEARCH CONFIGURATION unaccent ALTER MAPPING FOR
24+
asciiword, word WITH unaccent MAP russian_stem;
25+
26+
SELECT to_tsvector('unaccent', 'foobar ³öéëé £ÌËÉ');

0 commit comments

Comments
 (0)