From 70aa59b6dd6e0232bfb310f252070ccb709c52a2 Mon Sep 17 00:00:00 2001 From: Tomas Vondra Date: Sun, 22 Jan 2017 17:49:27 +0100 Subject: [PATCH] fix ordering of results in the tsearch2 regression suite --- src/test/regress/expected/tsearch.out | 201 +++++++++++++------------- 1 file changed, 101 insertions(+), 100 deletions(-) diff --git a/src/test/regress/expected/tsearch.out b/src/test/regress/expected/tsearch.out index 993d943414..0a63e1c4bc 100644 --- a/src/test/regress/expected/tsearch.out +++ b/src/test/regress/expected/tsearch.out @@ -236,7 +236,7 @@ SELECT ts_lexize('english_stem', 'identity'); {ident} (1 row) -SELECT * FROM ts_token_type('default'); +SELECT * FROM ts_token_type('default') ORDER BY tokid; tokid | alias | description -------+-----------------+------------------------------------------ 1 | asciiword | Word, all ASCII @@ -266,150 +266,150 @@ SELECT * FROM ts_token_type('default'); SELECT * FROM ts_parse('default', '345 qwe@efd.r '' http://www.com/ http://aew.werc.ewr/?ad=qwe&dw 1aew.werc.ewr/?ad=qwe&dw 2aew.werc.ewr http://3aew.werc.ewr/?ad=qwe&dw http://4aew.werc.ewr http://5aew.werc.ewr:8100/? ad=qwe&dw 6aew.werc.ewr:8100/?ad=qwe&dw 7aew.werc.ewr:8100/?ad=qwe&dw=%20%32 +4.0e-10 qwe qwe qwqwe 234.435 455 5.005 teodor@stack.net teodor@123-stack.net 123_teodor@stack.net 123-teodor@stack.net qwe-wer asdf qwer jf sdjk ewr1> ewri2 /usr/local/fff /awdf/dwqe/4325 rewt/ewr wefjn /wqe-324/ewr gist.h gist.h.c gist.c. readline 4.2 4.2. 4.2, readline-4.2 readline-4.2. 234 - wow < jqw <> qwerty'); + wow < jqw <> qwerty') ORDER BY tokid,token; tokid | token -------+-------------------------------------- - 22 | 345 - 12 | + 1 | ad + 1 | asdf + 1 | dw + 1 | hjwer + 1 | i + 1 | jf + 1 | jqw 1 | qwe - 12 | @ - 19 | efd.r - 12 | ' - 14 | http:// - 6 | www.com - 12 | / - 14 | http:// - 5 | aew.werc.ewr/?ad=qwe&dw - 6 | aew.werc.ewr - 18 | /?ad=qwe&dw - 12 | + 1 | qwe + 1 | qwe + 1 | qwe + 1 | qwer + 1 | qwerty + 1 | qwqwe + 1 | readline + 1 | readline + 1 | readline + 1 | sdjk + 1 | we + 1 | wefjn + 1 | wow + 3 | ewr1 + 3 | ewri2 + 4 | 123_teodor@stack.net + 4 | 123-teodor@stack.net + 4 | teodor@123-stack.net + 4 | teodor@stack.net 5 | 1aew.werc.ewr/?ad=qwe&dw + 5 | 3aew.werc.ewr/?ad=qwe&dw + 5 | 5aew.werc.ewr:8100/? + 5 | 6aew.werc.ewr:8100/?ad=qwe&dw + 5 | 7aew.werc.ewr:8100/?ad=qwe&dw=%20%32 + 5 | aew.werc.ewr/?ad=qwe&dw 6 | 1aew.werc.ewr - 18 | /?ad=qwe&dw - 12 | 6 | 2aew.werc.ewr - 12 | - 14 | http:// - 5 | 3aew.werc.ewr/?ad=qwe&dw 6 | 3aew.werc.ewr - 18 | /?ad=qwe&dw - 12 | - 14 | http:// 6 | 4aew.werc.ewr - 12 | - 14 | http:// - 5 | 5aew.werc.ewr:8100/? 6 | 5aew.werc.ewr:8100 - 18 | /? - 12 | - 1 | ad + 6 | 6aew.werc.ewr:8100 + 6 | 7aew.werc.ewr:8100 + 6 | aew.werc.ewr + 6 | www.com + 7 | +4.0e-10 + 11 | qwe + 11 | wer + 12 | < + 12 | < + 12 | <> + 12 | < 12 | = - 1 | qwe - 12 | & - 1 | dw + 12 | > 12 | - 5 | 6aew.werc.ewr:8100/?ad=qwe&dw - 6 | 6aew.werc.ewr:8100 - 18 | /?ad=qwe&dw 12 | - 5 | 7aew.werc.ewr:8100/?ad=qwe&dw=%20%32 - 6 | 7aew.werc.ewr:8100 - 18 | /?ad=qwe&dw=%20%32 12 | - 7 | +4.0e-10 12 | - 1 | qwe 12 | - 1 | qwe 12 | - 1 | qwqwe 12 | - 20 | 234.435 12 | - 22 | 455 12 | - 20 | 5.005 12 | - 4 | teodor@stack.net 12 | - 4 | teodor@123-stack.net 12 | - 4 | 123_teodor@stack.net 12 | - 4 | 123-teodor@stack.net 12 | - 16 | qwe-wer - 11 | qwe - 12 | - - 11 | wer 12 | - 1 | asdf 12 | - 13 | - 1 | qwer 12 | - 1 | jf 12 | - 1 | sdjk - 12 | < - 1 | we 12 | - 1 | hjwer 12 | - 13 | 12 | - 3 | ewr1 - 12 | > - 3 | ewri2 12 | - 13 | - 12 | + - | - 19 | /usr/local/fff 12 | - 19 | /awdf/dwqe/4325 12 | - 19 | rewt/ewr 12 | - 1 | wefjn 12 | - 19 | /wqe-324/ewr 12 | - 19 | gist.h 12 | - 19 | gist.h.c 12 | - 19 | gist.c - 12 | . - 1 | readline 12 | - 20 | 4.2 12 | - 20 | 4.2 - 12 | . - 20 | 4.2 - 12 | , - 1 | readline - 20 | -4.2 12 | - 1 | readline - 20 | -4.2 + 12 | + 12 | + 12 | + 12 | + 12 | + 12 | + 12 | + 12 | + 12 | + 12 | + 12 | + 12 | ' + 12 | - + 12 | , + 12 | / 12 | . - 22 | 234 + 12 | . + 12 | . + 12 | @ + 12 | & 12 | + | - 12 | < - 1 | i - 12 | + 12 | + + | + 13 | 13 | - 12 | - 1 | wow - 12 | - 12 | < - 1 | jqw - 12 | - 12 | <> - 1 | qwerty + 13 | + 13 | + 14 | http:// + 14 | http:// + 14 | http:// + 14 | http:// + 14 | http:// + 16 | qwe-wer + 18 | /? + 18 | /?ad=qwe&dw + 18 | /?ad=qwe&dw + 18 | /?ad=qwe&dw + 18 | /?ad=qwe&dw + 18 | /?ad=qwe&dw=%20%32 + 19 | /awdf/dwqe/4325 + 19 | efd.r + 19 | gist.c + 19 | gist.h + 19 | gist.h.c + 19 | rewt/ewr + 19 | /usr/local/fff + 19 | /wqe-324/ewr + 20 | 234.435 + 20 | -4.2 + 20 | -4.2 + 20 | 4.2 + 20 | 4.2 + 20 | 4.2 + 20 | 5.005 + 22 | 234 + 22 | 345 + 22 | 455 (139 rows) SELECT to_tsvector('english', '345 qwe@efd.r '' http://www.com/ http://aew.werc.ewr/?ad=qwe&dw 1aew.werc.ewr/?ad=qwe&dw 2aew.werc.ewr http://3aew.werc.ewr/?ad=qwe&dw http://4aew.werc.ewr http://5aew.werc.ewr:8100/? ad=qwe&dw 6aew.werc.ewr:8100/?ad=qwe&dw 7aew.werc.ewr:8100/?ad=qwe&dw=%20%32 +4.0e-10 qwe qwe qwqwe 234.435 455 5.005 teodor@stack.net teodor@123-stack.net 123_teodor@stack.net 123-teodor@stack.net qwe-wer asdf qwer jf sdjk ewr1> ewri2 @@ -1452,7 +1452,7 @@ select * from pendtest where 'ipsa:*'::tsquery @@ ts; 'ipsam':2 'lore':1 (1 row) -select * from pendtest where 'ips:*'::tsquery @@ ts; +select * from pendtest where 'ips:*'::tsquery @@ ts ORDER BY 1; ts -------------------- 'ipsam':2 'lore':1 @@ -1469,6 +1469,7 @@ select * from pendtest where 'ipi:*'::tsquery @@ ts; ---- (0 rows) +drop table pendtest; --check OP_PHRASE on index create temp table phrase_index_test(fts tsvector); insert into phrase_index_test values ('A fat cat has just eaten a rat.'); -- 2.39.5