Debian Codegraph @

src/backend/snowball/snowball.sql.in

raw
1 /*
2 * text search configuration for _LANGNAME_ language
3 *
4 * Copyright (c) 2007-2025, PostgreSQL Global Development Group
5 *
6 * src/backend/snowball/snowball.sql.in
7 *
8 * _LANGNAME_ and certain other macros are replaced for each language;
9 * see the Makefile for details.
10 *
11 * Note: this file is read in single-user -j mode, which means that the
12 * command terminator is semicolon-newline-newline; whenever the backend
13 * sees that, it stops and executes what it's got. If you write a lot of
14 * statements without empty lines between, they'll all get quoted to you
15 * in any error message about one of them, so don't do that. Also, you
16 * cannot write a semicolon immediately followed by an empty line in a
17 * string literal (including a function body!) or a multiline comment.
18 */
19
20 CREATE TEXT SEARCH DICTIONARY _DICTNAME_
21 (TEMPLATE = snowball, Language = _LANGNAME_ _STOPWORDS_);
22
23 COMMENT ON TEXT SEARCH DICTIONARY _DICTNAME_ IS 'snowball stemmer for _LANGNAME_ language';
24
25 CREATE TEXT SEARCH CONFIGURATION _CFGNAME_
26 (PARSER = default);
27
28 COMMENT ON TEXT SEARCH CONFIGURATION _CFGNAME_ IS 'configuration for _LANGNAME_ language';
29
30 ALTER TEXT SEARCH CONFIGURATION _CFGNAME_ ADD MAPPING
31 FOR email, url, url_path, host, file, version,
32 sfloat, float, int, uint,
33 numword, hword_numpart, numhword
34 WITH simple;
35
36 ALTER TEXT SEARCH CONFIGURATION _CFGNAME_ ADD MAPPING
37 FOR asciiword, hword_asciipart, asciihword
38 WITH _ASCDICTNAME_;
39
40 ALTER TEXT SEARCH CONFIGURATION _CFGNAME_ ADD MAPPING
41 FOR word, hword_part, hword
42 WITH _NONASCDICTNAME_;