Text parser rewritten:
Teodor Sigaev <teodor@sigaev.ru>
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'
Files
| Path | Change | +/− |
|---|---|---|
| contrib/tsearch2/expected/tsearch2.out | modified | +73 −46 |
| contrib/tsearch2/Makefile | modified | +3 −2 |
| contrib/tsearch2/query.c | modified | +78 −4 |
| contrib/tsearch2/query_support.c | modified | +111 −0 |
| contrib/tsearch2/sql/tsearch2.sql | modified | +7 −0 |
| contrib/tsearch2/tsearch.sql.in | modified | +56 −0 |
| contrib/tsearch2/ts_locale.c | added | +61 −0 |
| contrib/tsearch2/ts_locale.h | added | +38 −0 |
| contrib/tsearch2/wordparser/deflex.c | modified | +2 −2 |
| contrib/tsearch2/wordparser/deflex.h | modified | +1 −1 |
| contrib/tsearch2/wordparser/Makefile | modified | +2 −9 |
| contrib/tsearch2/wordparser/parser.c | added | +1028 −0 |
| contrib/tsearch2/wordparser/parser.h | modified | +142 −5 |
| contrib/tsearch2/wordparser/parser.l | deleted | +0 −346 |
| contrib/tsearch2/wparser_def.c | modified | +11 −9 |