-
-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test-fuzzy-autocomplete-http.rec #2770
base: master
Are you sure you want to change the base?
Conversation
Linux debug test results 10 files 10 suites 9m 27s ⏱️ For more details on these failures, see this check. Results for commit 978ac4d. |
Linux release test results 10 files 10 suites 7m 8s ⏱️ For more details on these failures, see this check. Results for commit 978ac4d. |
clt👎 CLT tests in test/clt-tests/buddy/test-fuzzy-autocomplete-http.rec––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; searchd; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
Manticore %{SEMVER} %{COMMITDATE}#!/(\sdev)?\s/!#(columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{SEMVER} %{COMMITDATE}#!/(\sdev)?\s/!#(columnar %{SEMVER} %{COMMITDATE}) (secondary %{SEMVER} %{COMMITDATE}) (knn %{SEMVER} %{COMMITDATE})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
apt-get update -y > /dev/null; echo $?
––– output –––
0
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
debconf: delaying package configuration, since apt-utils is not installed
0
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=1000 --concurrency=4 --docs=5000000 --start-id=1 --min-infix-len=2 > /dev/null; echo $?
––– output –––
0
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE name;" | grep "min_infix_len='2'" | sed "s/.*\(min_infix_len='2'\).*/\1/"
––– output –––
min_infix_len='2'
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
+----------+
| count(*) |
+----------+
| 5000000 |
+----------+
––– input –––
mysql -h0 -P9306 -e "OPTIMIZE TABLE name OPTION sync=1;"
––– output –––
––– input –––
––– input –––
––– output –––
+ bash: –––: command not found
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"EBGRNA"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
+ {
+ "took": 6,
+ "timed_out": false,
+ "hits": {
+ "total": 21778,
+ "total_relation": "eq",
+ "hits": [
+ {
+ "_id": 2764241,
+ "_score": 2512,
+ "_source": {
+ "username": "BERNARDO ABERNATHY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 1883203,
+ "_score": 2512,
+ "_source": {
+ "username": "BERNARDA BERNAL",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 1478502,
+ "_score": 2512,
+ "_source": {
+ "username": "FERNANDE BERNAL",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 1202818,
+ "_score": 2512,
+ "_source": {
+ "username": "BERNARDO BERNAL",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4168915,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA KINSEY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4122811,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA DELUCA",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4057439,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA SHORE",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4177581,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA SCHMITZ",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4177973,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA TYSON",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4100076,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA KELLEY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4062379,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA NOE",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4178850,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA DAVEY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4259238,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA ROBERSON",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4067949,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA IVEY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4265032,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA MOJICA",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4266667,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA BEALL",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4185910,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA STRUNK",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4133272,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA MUSSER",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4068270,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA RENTERIA",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4138199,
+ "_score": 1594,
+ "_source": {
+ "username": "BERNA LANDEROS",
+ "s": "a"
+ }
+ }
+ ]
+ }
+ }
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"ANT"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
+ {
+ "took": 2100,
+ "timed_out": false,
+ "hits": {
+ "total": 1246771,
+ "total_relation": "eq",
+ "hits": [
+ {
+ "_id": 4235538,
+ "_score": 2532,
+ "_source": {
+ "username": "DEAN KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4122733,
+ "_score": 2532,
+ "_source": {
+ "username": "FRANCIS KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4178912,
+ "_score": 2532,
+ "_source": {
+ "username": "LILLIAN KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4065359,
+ "_score": 2532,
+ "_source": {
+ "username": "ANGIE KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4132144,
+ "_score": 2532,
+ "_source": {
+ "username": "NATHANIAL KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4271887,
+ "_score": 2532,
+ "_source": {
+ "username": "ANGELES KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4144090,
+ "_score": 2532,
+ "_source": {
+ "username": "DANIEL KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4150341,
+ "_score": 2532,
+ "_source": {
+ "username": "TANEKA KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4313774,
+ "_score": 2532,
+ "_source": {
+ "username": "MEGHAN KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4216034,
+ "_score": 2532,
+ "_source": {
+ "username": "JEANMARIE KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4333679,
+ "_score": 2532,
+ "_source": {
+ "username": "FRANCESCA KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4059222,
+ "_score": 2532,
+ "_source": {
+ "username": "DANETTE KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4371160,
+ "_score": 2532,
+ "_source": {
+ "username": "JANETH KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4844233,
+ "_score": 2530,
+ "_source": {
+ "username": "SANDA KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4786291,
+ "_score": 2530,
+ "_source": {
+ "username": "CHANG KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4827213,
+ "_score": 2530,
+ "_source": {
+ "username": "KRISTIAN KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4843613,
+ "_score": 2530,
+ "_source": {
+ "username": "SHANELL KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4808598,
+ "_score": 2530,
+ "_source": {
+ "username": "SANDA KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4935009,
+ "_score": 2530,
+ "_source": {
+ "username": "MARIANELA KENT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4647417,
+ "_score": 2530,
+ "_source": {
+ "username": "VANESSA KENT",
+ "s": "a"
+ }
+ }
+ ]
+ }
+ }
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"tony"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
+ {
+ "took": 6,
+ "timed_out": false,
+ "hits": {
+ "total": 21250,
+ "total_relation": "eq",
+ "hits": [
+ {
+ "_id": 2606620,
+ "_score": 2515,
+ "_source": {
+ "username": "ANTONY TONEY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4877078,
+ "_score": 1538,
+ "_source": {
+ "username": "TOBY ANTONIO",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4561819,
+ "_score": 1538,
+ "_source": {
+ "username": "ANTONIO TONEY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4586261,
+ "_score": 1538,
+ "_source": {
+ "username": "ANTONIO TONEY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998407,
+ "_score": 1528,
+ "_source": {
+ "username": "NOREEN TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4924991,
+ "_score": 1528,
+ "_source": {
+ "username": "JESUS TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4964074,
+ "_score": 1528,
+ "_source": {
+ "username": "FERNANDE TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4850492,
+ "_score": 1528,
+ "_source": {
+ "username": "MERCY TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4977807,
+ "_score": 1528,
+ "_source": {
+ "username": "TERRIE TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4873836,
+ "_score": 1528,
+ "_source": {
+ "username": "CATHI TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4827299,
+ "_score": 1528,
+ "_source": {
+ "username": "SUNG TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4988315,
+ "_score": 1528,
+ "_source": {
+ "username": "NIA TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4923647,
+ "_score": 1528,
+ "_source": {
+ "username": "MARYJANE TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4851756,
+ "_score": 1528,
+ "_source": {
+ "username": "SHANTEL TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4771782,
+ "_score": 1528,
+ "_source": {
+ "username": "JOSELYN TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 302103,
+ "_score": 1528,
+ "_source": {
+ "username": "KEISHA TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4921171,
+ "_score": 1528,
+ "_source": {
+ "username": "ILLA TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4824249,
+ "_score": 1528,
+ "_source": {
+ "username": "SPARKLE TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4824254,
+ "_score": 1528,
+ "_source": {
+ "username": "GERTRUDE TONG",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4856835,
+ "_score": 1528,
+ "_source": {
+ "username": "LONA TONG",
+ "s": "a"
+ }
+ }
+ ]
+ }
+ }
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"SMITH"}}]}}, "sort":[{"id":"desc"},{"username":"asc"}], "options":{"fuzzy":true}}' | jq -M
––– output –––
+ {
+ "took": 8,
+ "timed_out": false,
+ "hits": {
+ "total": 40922,
+ "total_relation": "eq",
+ "hits": [
+ {
+ "_id": 4999912,
+ "_score": 1,
+ "_source": {
+ "username": "JANITA MAHAN",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999886,
+ "_score": 1,
+ "_source": {
+ "username": "MEREDITH ARMIJO",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999605,
+ "_score": 1,
+ "_source": {
+ "username": "RUTHE MESSER",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999553,
+ "_score": 1,
+ "_source": {
+ "username": "WANITA BURNETT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999511,
+ "_score": 1,
+ "_source": {
+ "username": "SCOTTY RALPH",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999437,
+ "_score": 1,
+ "_source": {
+ "username": "EDITH FERRIS",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999419,
+ "_score": 1,
+ "_source": {
+ "username": "JAMEE SOUTHARD",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999327,
+ "_score": 1,
+ "_source": {
+ "username": "KEITH LAMBERT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999295,
+ "_score": 1,
+ "_source": {
+ "username": "GEMMA SOUTH",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999075,
+ "_score": 1,
+ "_source": {
+ "username": "LANITA RODRIGUEZ",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998638,
+ "_score": 1,
+ "_source": {
+ "username": "SCOTT DOHERTY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998521,
+ "_score": 1,
+ "_source": {
+ "username": "THEO RUTHERFORD",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998502,
+ "_score": 1,
+ "_source": {
+ "username": "RUTHIE TU",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998444,
+ "_score": 1,
+ "_source": {
+ "username": "LYMAN MEREDITH",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998335,
+ "_score": 1,
+ "_source": {
+ "username": "MINH PHAN",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998113,
+ "_score": 1,
+ "_source": {
+ "username": "SCOTTY CHANCE",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4997928,
+ "_score": 1,
+ "_source": {
+ "username": "JEFFERSON SMYTH",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4997881,
+ "_score": 1,
+ "_source": {
+ "username": "REYNALDA SCOTT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4997823,
+ "_score": 1,
+ "_source": {
+ "username": "SANJUANITA ELLINGTON",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4997751,
+ "_score": 1,
+ "_source": {
+ "username": "EDITH DILLARD",
+ "s": "a"
+ }
+ }
+ ]
+ }
+ }
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"SMYTH"}}]}}, "sort":[{"id":"desc"},{"username":"asc"}], "options":{"fuzzy":true}}' | jq -M
––– output –––
+ {
+ "took": 8,
+ "timed_out": false,
+ "hits": {
+ "total": 49375,
+ "total_relation": "eq",
+ "hits": [
+ {
+ "_id": 4999954,
+ "_score": 1,
+ "_source": {
+ "username": "EDYTH COPELAND",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999620,
+ "_score": 1,
+ "_source": {
+ "username": "MICHEL ELLSWORTH",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999605,
+ "_score": 1,
+ "_source": {
+ "username": "RUTHE MESSER",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999511,
+ "_score": 1,
+ "_source": {
+ "username": "SCOTTY RALPH",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999488,
+ "_score": 1,
+ "_source": {
+ "username": "KAYLEEN WORTHY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999446,
+ "_score": 1,
+ "_source": {
+ "username": "JAMAL STALLWORTH",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999419,
+ "_score": 1,
+ "_source": {
+ "username": "JAMEE SOUTHARD",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999374,
+ "_score": 1,
+ "_source": {
+ "username": "COLEEN HOLLINGSWORTH",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999327,
+ "_score": 1,
+ "_source": {
+ "username": "KEITH LAMBERT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999295,
+ "_score": 1,
+ "_source": {
+ "username": "GEMMA SOUTH",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4999098,
+ "_score": 1,
+ "_source": {
+ "username": "DANUTA HOYT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998875,
+ "_score": 1,
+ "_source": {
+ "username": "NEVADA STALLWORTH",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998638,
+ "_score": 1,
+ "_source": {
+ "username": "SCOTT DOHERTY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998521,
+ "_score": 1,
+ "_source": {
+ "username": "THEO RUTHERFORD",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998503,
+ "_score": 1,
+ "_source": {
+ "username": "LAVERNE WORTHY",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998502,
+ "_score": 1,
+ "_source": {
+ "username": "RUTHIE TU",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4998113,
+ "_score": 1,
+ "_source": {
+ "username": "SCOTTY CHANCE",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4997928,
+ "_score": 1,
+ "_source": {
+ "username": "JEFFERSON SMYTH",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4997881,
+ "_score": 1,
+ "_source": {
+ "username": "REYNALDA SCOTT",
+ "s": "a"
+ }
+ },
+ {
+ "_id": 4997779,
+ "_score": 1,
+ "_source": {
+ "username": "ADRIA WENTWORTH",
+ "s": "a"
+ }
+ }
+ ]
+ }
+ }
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"layouts":"us,ru"}}' | jq -M
––– output –––
+ [
+ {
+ "total": 10,
+ "error": "",
+ "warning": "",
+ "columns": [
+ {
+ "query": {
+ "type": "string"
+ }
+ }
+ ],
+ "data": [
+ {
+ "query": "joe"
+ },
+ {
+ "query": "jordan"
+ },
+ {
+ "query": "joseph"
+ },
+ {
+ "query": "jose"
+ },
+ {
+ "query": "john"
+ },
+ {
+ "query": "jonas"
+ },
+ {
+ "query": "joy"
+ },
+ {
+ "query": "joey"
+ },
+ {
+ "query": "joyce"
+ },
+ {
+ "query": "major"
+ }
+ ]
+ }
+ ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"append":1}}' | jq -M
––– output –––
+ [
+ {
+ "total": 10,
+ "error": "",
+ "warning": "",
+ "columns": [
+ {
+ "query": {
+ "type": "string"
+ }
+ }
+ ],
+ "data": [
+ {
+ "query": "joe"
+ },
+ {
+ "query": "jordan"
+ },
+ {
+ "query": "joseph"
+ },
+ {
+ "query": "jose"
+ },
+ {
+ "query": "john"
+ },
+ {
+ "query": "jonas"
+ },
+ {
+ "query": "joy"
+ },
+ {
+ "query": "joey"
+ },
+ {
+ "query": "joyce"
+ },
+ {
+ "query": "major"
+ }
+ ]
+ }
+ ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"prepend":0}}' | jq -M
––– output –––
+ [
+ {
+ "total": 10,
+ "error": "",
+ "warning": "",
+ "columns": [
+ {
+ "query": {
+ "type": "string"
+ }
+ }
+ ],
+ "data": [
+ {
+ "query": "joe"
+ },
+ {
+ "query": "jordan"
+ },
+ {
+ "query": "joseph"
+ },
+ {
+ "query": "jose"
+ },
+ {
+ "query": "john"
+ },
+ {
+ "query": "jonas"
+ },
+ {
+ "query": "joey"
+ },
+ {
+ "query": "joy"
+ },
+ {
+ "query": "johnson"
+ },
+ {
+ "query": "joyce"
+ }
+ ]
+ }
+ ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"prepend":1,"append":1}}' | jq -M
––– output –––
+ [
+ {
+ "total": 10,
+ "error": "",
+ "warning": "",
+ "columns": [
+ {
+ "query": {
+ "type": "string"
+ }
+ }
+ ],
+ "data": [
+ {
+ "query": "joe"
+ },
+ {
+ "query": "jordan"
+ },
+ {
+ "query": "joseph"
+ },
+ {
+ "query": "jose"
+ },
+ {
+ "query": "john"
+ },
+ {
+ "query": "jonas"
+ },
+ {
+ "query": "joy"
+ },
+ {
+ "query": "joey"
+ },
+ {
+ "query": "joyce"
+ },
+ {
+ "query": "major"
+ }
+ ]
+ }
+ ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":1,"layouts":"","append":1,"prepend":1}}' | jq -M
––– output –––
+ [
+ {
+ "total": 10,
+ "error": "",
+ "warning": "",
+ "columns": [
+ {
+ "query": {
+ "type": "string"
+ }
+ }
+ ],
+ "data": [
+ {
+ "query": "joe"
+ },
+ {
+ "query": "jordan"
+ },
+ {
+ "query": "joseph"
+ },
+ {
+ "query": "jose"
+ },
+ {
+ "query": "john"
+ },
+ {
+ "query": "jonas"
+ },
+ {
+ "query": "joy"
+ },
+ {
+ "query": "joey"
+ },
+ {
+ "query": "joyce"
+ },
+ {
+ "query": "major"
+ }
+ ]
+ }
+ ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":2,"layouts":"us,ru","append":1,"prepend":1,"expansion_len":2}}' | jq -M
––– output –––
+ [
+ {
+ "total": 5,
+ "error": "",
+ "warning": "",
+ "columns": [
+ {
+ "query": {
+ "type": "string"
+ }
+ }
+ ],
+ "data": [
+ {
+ "query": "joe"
+ },
+ {
+ "query": "jose"
+ },
+ {
+ "query": "john"
+ },
+ {
+ "query": "joy"
+ },
+ {
+ "query": "joey"
+ }
+ ]
+ }
+ ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"gr","options":{"fuzziness":1,"layouts":"ru","append":1,"prepend":1}}' | jq -M
––– output –––
-
+ [
+ {
+ "total": 10,
+ "error": "",
+ "warning": "",
+ "columns": [
+ {
+ "query": {
+ "type": "string"
+ }
+ }
+ ],
+ "data": [
+ {
+ "query": "gregory"
+ },
+ {
+ "query": "grady"
+ },
+ {
+ "query": "grant"
+ },
+ {
+ "query": "grace"
+ },
+ {
+ "query": "grover"
+ },
+ {
+ "query": "gregg"
+ },
+ {
+ "query": "gracia"
+ },
+ {
+ "query": "graham"
+ },
+ {
+ "query": "graff"
+ },
+ {
+ "query": "grogan"
+ }
+ ]
+ }
+ ]
+ ––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":1}}' | jq -M
+ ––– output –––
+ [
+ {
+ "total": 10,
+ "error": "",
+ "warning": "",
+ "columns": [
+ {
+ "query": {
+ "type": "string"
+ }
+ }
+ ],
+ "data": [
+ {
+ "query": "joe"
+ },
+ {
+ "query": "jordan"
+ },
+ {
+ "query": "joseph"
+ },
+ {
+ "query": "jose"
+ },
+ {
+ "query": "john"
+ },
+ {
+ "query": "jonas"
+ },
+ {
+ "query": "joy"
+ },
+ {
+ "query": "joey"
+ },
+ {
+ "query": "joyce"
+ },
+ {
+ "query": "major"
+ }
+ ]
+ }
+ ]
+
|
Implementation of test-fuzzy-autocomplete-http.rec