summaryrefslogtreecommitdiff
path: root/src/backend/snowball/snowball.sql.in
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-10-23 20:46:12 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-10-23 20:46:12 +0000
commitdbaec70c153239224c0288d865b96c2f939fbdf5 (patch)
treea2309acc315e5d4b9f9b0cd8b2ad60dc999ba93d /src/backend/snowball/snowball.sql.in
parent344d0cae64dbf398559b855806fc7338ec0a2e64 (diff)
downloadpostgresql-dbaec70c153239224c0288d865b96c2f939fbdf5.tar.gz
Rename and slightly redefine the default text search parser's "word"
categories, as per discussion. asciiword (formerly lword) is still ASCII-letters-only, and numword (formerly word) is still the most general mixed-alpha-and-digits case. But word (formerly nlword) is now any-group-of-letters-with-at-least-one-non-ASCII, rather than all-non-ASCII as before. This is no worse than before for parsing mixed Russian/English text, which seems to have been the design center for the original coding; and it should simplify matters for parsing most European languages. In particular it will not be necessary for any language to accept strings containing digits as being regular "words". The hyphenated-word categories are adjusted similarly.
Diffstat (limited to 'src/backend/snowball/snowball.sql.in')
-rw-r--r--src/backend/snowball/snowball.sql.in13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/backend/snowball/snowball.sql.in b/src/backend/snowball/snowball.sql.in
index 8b6328a083..7a32c85edb 100644
--- a/src/backend/snowball/snowball.sql.in
+++ b/src/backend/snowball/snowball.sql.in
@@ -1,4 +1,4 @@
--- $PostgreSQL: pgsql/src/backend/snowball/snowball.sql.in,v 1.4 2007/09/03 02:30:43 tgl Exp $$
+-- $PostgreSQL: pgsql/src/backend/snowball/snowball.sql.in,v 1.5 2007/10/23 20:46:12 tgl Exp $$
-- text search configuration for _LANGNAME_ language
CREATE TEXT SEARCH DICTIONARY _DICTNAME_
@@ -12,14 +12,15 @@ CREATE TEXT SEARCH CONFIGURATION _CFGNAME_
COMMENT ON TEXT SEARCH CONFIGURATION _CFGNAME_ IS 'configuration for _LANGNAME_ language';
ALTER TEXT SEARCH CONFIGURATION _CFGNAME_ ADD MAPPING
- FOR email, url, host, sfloat, version, uri, file, float, int, uint
+ FOR email, url, host, sfloat, version, uri, file, float, int, uint,
+ numword, hword_numpart, numhword
WITH simple;
ALTER TEXT SEARCH CONFIGURATION _CFGNAME_ ADD MAPPING
- FOR lhword, lpart_hword, lword
- WITH _LATDICTNAME_;
+ FOR asciiword, hword_asciipart, asciihword
+ WITH _ASCDICTNAME_;
ALTER TEXT SEARCH CONFIGURATION _CFGNAME_ ADD MAPPING
- FOR hword, nlhword, nlpart_hword, nlword, word, part_hword
- WITH _NONLATDICTNAME_;
+ FOR word, hword_part, hword
+ WITH _NONASCDICTNAME_;