Skip to content
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

🆕 Update buddy version (fix/fuzzy-no-match) #2756

Merged
merged 30 commits into from
Nov 24, 2024

Conversation

githubmanticore
Copy link
Contributor

Update buddy version to: 3.0.1 24111309 ed28c99 which includes:

ed28c99 Route all queries for Fuzzy without match and improve error message on missing match
f599a87 fixed mistype in README.md
6707485 Fixed response handling in plugins (#393)
5d89277 Added the handling of bigints; updated deps (#335)

@donhardman donhardman force-pushed the buddy-397 branch 2 times, most recently from a821f70 to 56eeecd Compare November 14, 2024 08:44
tomatolog and others added 21 commits November 14, 2024 15:44
* fixed buddy reply routing at daemon for /cli endpoint; fixed #2269
implemented jieba_user_dict_path
…lines at the query log for error report and buddy report; fixed #2235
Added that queries processed through Buddy are not logged in plain mode.
That is very edge case when you alter a table adding stored column when
there were no stored columns before.

Test provided.

That is related to #2708
…se hitpos of the following tokens; fixed #2704; added case to test 219
* Creating files for the test

* Update test-drop-sharding-table.rec

* Moved test-drop-sharding-table

* Deleted buddy_path = manticore-executor /workdir/src/main.php

* Added new sharded tables

* Added new outputs

* Fixed test-drop-sharding-table.rec

* Added new cases for table deletion

---------

Co-authored-by: Pavel_Shilin <[email protected]>
* Update test-create-table-like-existing-table-with-data.rec

* Added cases with different syntax of IF NOT EXISTS support

---------

Co-authored-by: Pavel_Shilin <[email protected]>
Copy link

clt

👎 CLT tests in test/clt-tests/buddy/
✅ OK: 3
❌ Failed: 1
⏳ Duration: 74s
👉 Check Action Results for commit 7cda5de
Failed tests:

test/clt-tests/buddy/test-fuzzy-search.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=-1 ./test/clt-tests/scripts/load_us_names_min_infix_len.php 1000 10 1000000 5 2 > /dev/null
––– output –––
––– 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(*) |
+----------+
|  1000000 |
+----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('RICH') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+-------------------+
| id   | username          |
+------+-------------------+
|  195 | BRICE MULLIN      |
|  306 | GRICELDA SKELTON  |
|  362 | LAURICE SOLIZ     |
|  477 | ERICH LLAMAS      |
|  489 | LATRICE MANCILLA  |
|  607 | MAURICE PRATHER   |
|  658 | BRICE OLIVARES    |
|  696 | PATRICE WOOD      |
|  821 | JUNITA RICHARD    |
|  834 | AUREA RICO        |
|  853 | ROXANNE BRICE     |
| 1121 | RICH MOLL         |
| 1133 | JOELLA RICHARD    |
| 1159 | MINDY HEINRICH    |
| 1223 | YADIRA RICHARDSON |
| 1378 | BRICE ALLMAN      |
| 1573 | RICO VALENZUELA   |
| 1601 | BEATRICE LOVE     |
| 1821 | RICHELLE ROE      |
| 2135 | CHIQUITA RICHTER  |
+------+-------------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+----------------------+
| id   | username             |
+------+----------------------+
|  674 | CONCEPTION ABERNATHY |
|  963 | BERNARDINA OSHEA     |
| 1353 | VERNA VITALE         |
| 1783 | BERNADETTE HALES     |
| 1838 | BERNARDINA MCMILLAN  |
| 1863 | ERNA ULLOA           |
| 1947 | SAMIRA ABERNATHY     |
| 2237 | JUDI BERNAL          |
| 2445 | MERNA GAITHER        |
| 3064 | BERNADINE HIBBARD    |
| 3194 | BERNADETTE SHELTON   |
| 3687 | VERNA GASTON         |
| 3780 | BERNARDINE WILKINS   |
| 4369 | ERNA VITALE          |
| 4636 | TARSHA HERNANDEZ     |
| 4661 | FERNANDO HOUCK       |
| 5043 | CONSTANCE ABERNATHY  |
| 5579 | LAVERNA GORMAN       |
| 5581 | FERNANDE ISRAEL      |
| 5797 | LAVERNA STORM        |
+------+----------------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('ANT') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+-------------------+
| id   | username          |
+------+-------------------+
|    7 | DAMIAN SOMERS     |
|   15 | TAMI WHELAN       |
|   18 | DARCY SANDBERG    |
|   19 | RANEE BROUGHTON   |
|   20 | STEPHEN ALLMAN    |
|   29 | AMANDA KEY        |
|   36 | ELFRIEDA HANKS    |
|   40 | NANNIE WILLINGHAM |
|   41 | YOULANDA TROUT    |
|   43 | ANTHONY SMOOT     |
|   46 | FRANCIE BUNDY     |
|   50 | LATASHA POLAND    |
|   52 | SHEMEKA DURAND    |
|   53 | LATANYA ARNDT     |
|   55 | JANELLE LASTER    |
|   56 | NANNIE HANNON     |
|   57 | GRANVILLE VALDEZ  |
|   58 | DEDE SPANN        |
|   59 | DANIEL MERRITT    |
|   62 | SAUL HOWLAND      |
+------+-------------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('tony') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+--------------------+
| id   | username           |
+------+--------------------+
|  117 | ANTONIA VANWINKLE  |
|  219 | ANTONIA MELGAR     |
|  390 | KARYL TONEY        |
|  760 | TONYA SHERRILL     |
| 1526 | LEONE TONEY        |
| 2131 | TONIA RAPP         |
| 2194 | TONIE HOANG        |
| 2332 | LATONIA VILLASENOR |
| 2356 | TONIE BARNHILL     |
| 2429 | TONIA BOSTICK      |
| 2583 | TONI SPENCE        |
| 2724 | ANTONIETTA CINTRON |
| 2880 | ANTONINA HASKELL   |
| 3317 | TONY DUPRE         |
| 3581 | ANTONIETTA BAEZ    |
| 3857 | TONEY SCHOEN       |
| 4365 | ROCHEL TONEY       |
| 4607 | ANTONIA DRISCOLL   |
| 4656 | TONYA PARRIS       |
| 4799 | TONY WEISS         |
+------+--------------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+
| id     | username          |
+--------+-------------------+
| 999972 | KEITH SNOW        |
| 999928 | BONITA LEONG      |
| 999858 | TONITA GEARY      |
| 999854 | DOROTHA WISEMAN   |
| 999722 | SCOTT OLSON       |
| 999721 | TONITA ESTRADA    |
| 999263 | RUTHANN GREENE    |
| 999249 | MINH LANDERS      |
| 999126 | MALENA RUTHERFORD |
| 999119 | RUTHANNE CARDOSO  |
| 998892 | IRWIN SOUTHARD    |
| 998690 | MITCHELL SEITZ    |
| 998580 | RAMONITA SWISHER  |
| 998565 | RAMONITA MAYO     |
| 998538 | ELSA SEITZ        |
| 998525 | SCOTT CARRION     |
| 997944 | RUTHE SCHENK      |
| 997814 | MINH GOODWIN      |
| 997587 | RAMONITA GIBBONS  |
| 997557 | ARTIE SOUTH       |
+--------+-------------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+
| id     | username          |
+--------+-------------------+
| 999972 | KEITH SNOW        |
| 999928 | BONITA LEONG      |
| 999858 | TONITA GEARY      |
| 999854 | DOROTHA WISEMAN   |
| 999722 | SCOTT OLSON       |
| 999721 | TONITA ESTRADA    |
| 999263 | RUTHANN GREENE    |
| 999249 | MINH LANDERS      |
| 999126 | MALENA RUTHERFORD |
| 999119 | RUTHANNE CARDOSO  |
| 998892 | IRWIN SOUTHARD    |
| 998690 | MITCHELL SEITZ    |
| 998580 | RAMONITA SWISHER  |
| 998565 | RAMONITA MAYO     |
| 998538 | ELSA SEITZ        |
| 998525 | SCOTT CARRION     |
| 997944 | RUTHE SCHENK      |
| 997814 | MINH GOODWIN      |
| 997587 | RAMONITA GIBBONS  |
| 997557 | ARTIE SOUTH       |
+--------+-------------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMYTH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+
| id     | username          |
+--------+-------------------+
| 999972 | KEITH SNOW        |
| 999854 | DOROTHA WISEMAN   |
| 999722 | SCOTT OLSON       |
| 999498 | DORTHY DUCKWORTH  |
| 999263 | RUTHANN GREENE    |
| 999196 | HEATH MCNAMARA    |
| 999126 | MALENA RUTHERFORD |
| 999119 | RUTHANNE CARDOSO  |
| 999012 | HEATHER HAMMOCK   |
| 998892 | IRWIN SOUTHARD    |
| 998676 | BURT WOODWORTH    |
| 998525 | SCOTT CARRION     |
| 998220 | MORA WENTWORTH    |
| 998083 | EDMUND ASHWORTH   |
| 997999 | EDYTH CARLISLE    |
| 997944 | RUTHE SCHENK      |
| 997557 | ARTIE SOUTH       |
| 997543 | HEATHER CLAUSEN   |
| 997395 | JON ASHWORTH      |
| 997286 | JOI FARNSWORTH    |
+--------+-------------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy="1";"
––– output –––
+--------+-------------------+
| id     | username          |
+--------+-------------------+
| 999972 | KEITH SNOW        |
| 999928 | BONITA LEONG      |
| 999858 | TONITA GEARY      |
| 999854 | DOROTHA WISEMAN   |
| 999722 | SCOTT OLSON       |
| 999721 | TONITA ESTRADA    |
| 999263 | RUTHANN GREENE    |
| 999249 | MINH LANDERS      |
| 999126 | MALENA RUTHERFORD |
| 999119 | RUTHANNE CARDOSO  |
| 998892 | IRWIN SOUTHARD    |
| 998690 | MITCHELL SEITZ    |
| 998580 | RAMONITA SWISHER  |
| 998565 | RAMONITA MAYO     |
| 998538 | ELSA SEITZ        |
| 998525 | SCOTT CARRION     |
| 997944 | RUTHE SCHENK      |
| 997814 | MINH GOODWIN      |
| 997587 | RAMONITA GIBBONS  |
| 997557 | ARTIE SOUTH       |
+--------+-------------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('john') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+------------------------+
| id     | username               |
+--------+------------------------+
| 999960 | JONELL ENRIGHT         |
| 999931 | JONELL NIX             |
| 999925 | JONAH BURNSIDE         |
| 999921 | LAVONNA JONAS          |
| 999859 | JOHNETTA DO            |
| 999551 | JOHNNY CARNES          |
| 999547 | JOHNATHAN PEPPER       |
| 999508 | JOHNATHAN STUBBLEFIELD |
| 999170 | JOHNNY ABRAMS          |
| 999032 | AGNUS STJOHN           |
| 998834 | SCARLETT JONAS         |
| 998797 | JOHNATHON READ         |
| 998466 | JOHNSON JEAN           |
| 998392 | JOHN BACH              |
| 998305 | JOHNNY TAFOYA          |
| 998303 | JONG SAUER             |
| 998302 | JONATHON DUPRE         |
| 998277 | JOHNNIE LOR            |
| 998180 | JONA ELROD             |
| 998153 | JONG YORK              |
+--------+------------------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('jane') AND id BETWEEN 10000 AND 20000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
+-------+--------------------+
| id    | username           |
+-------+--------------------+
| 11037 | DESIRE LANE        |
| 11055 | LANELLE WATTS      |
| 11358 | JANIE CRAWFORD     |
| 11391 | JAN LEW            |
| 11396 | MELITA LANE        |
| 11414 | MARYJANE HOLTZ     |
| 11498 | JANN LEDEZMA       |
| 11568 | JANETH SELBY       |
| 11752 | TRACIE JANKOWSKI   |
| 11757 | JANETTE GANTT      |
| 11833 | JANELLE DRIGGERS   |
| 10027 | ANJANETTE PORTILLO |
| 10055 | JANETTE LYNCH      |
| 10068 | JANN HACKETT       |
| 10110 | ALEJANDRINA DOWNS  |
| 10242 | ALEJANDRINA ZAPATA |
| 10269 | JANNET QUINN       |
| 10326 | JANICE APPEL       |
| 10385 | JANN CASON         |
| 10628 | LANETTE SWAIN      |
+-------+--------------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') AND id BETWEEN 1000 AND 2000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
+------+---------------------+
| id   | username            |
+------+---------------------+
| 1353 | VERNA VITALE        |
| 1783 | BERNADETTE HALES    |
| 1838 | BERNARDINA MCMILLAN |
| 1863 | ERNA ULLOA          |
| 1947 | SAMIRA ABERNATHY    |
+------+---------------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SARA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+------------------+
| id   | username         |
+------+------------------+
|  187 | LARA KIRK        |
|  206 | CLARA MORRIS     |
|  350 | KLARA DONALDSON  |
|  989 | ELAINE SARABIA   |
| 1408 | LARA FREDERICK   |
| 1660 | SARA GARNER      |
| 1819 | KARA CINTRON     |
| 1830 | SARAI ESPINAL    |
| 2073 | VALENTIN SARABIA |
| 2929 | LARA CINTRON     |
| 3044 | KLARA ANDRES     |
| 3372 | KLARA NORTON     |
| 3740 | CRUZ SARABIA     |
| 3779 | RUSSEL LARA      |
| 4699 | HEE SARABIA      |
| 4932 | KLARA GOODING    |
| 5829 | SARAI LINDLEY    |
| 5864 | SARAN KNAPP      |
| 5917 | SARA WAITE       |
| 6634 | CLARA BEALE      |
+------+------------------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joy     |
| joyce   |
| major   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joy     |
| joyce   |
| major   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joy     |
| joyce   |
| major   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 0 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joshua  |
| joy     |
| joyce   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend, 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joy     |
| joyce   |
| major   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness, '' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joy     |
| joyce   |
| major   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 2 AS fuzziness, 'us,ru' AS layouts, 1 AS append, 1 AS prepend, 2 AS expansion_len);" | tail -n +4 | sort
––– output –––
+-------+
| joe   |
| john  |
| jose  |
| joy   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joy     |
| joyce   |
| major   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joy     |
| joyce   |
| major   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joy     |
| joyce   |
| major   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joy     |
| joyce   |
| major   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe     |
| john    |
| johnson |
| jonas   |
| jordan  |
| jose    |
| joseph  |
| joy     |
| joyce   |
| major   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('al', 'name', 0 AS fuzziness);" | tail -n +4 | sort
––– output –––
+-----------+
| albert    |
| alexander |
| allen     |
| dale      |
| dallas    |
| donald    |
| gale      |
| kendall   |
| marshall  |
| walter    |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('mi', 'name', 0 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| ami     |
| britni  |
| brittni |
| cami    |
| choi    |
| darci   |
| eleni   |
| jami    |
| jani    |
| jeni    |
| joi     |
| kaci    |
| kami    |
| kimi    |
| laci    |
| lani    |
| luci    |
| mancini |
| marci   |
| martini |
| melani  |
| muoi    |
| nanci   |
| neomi   |
| noemi   |
| nohemi  |
| ricci   |
| shani   |
| staci   |
| tammi   |
| toi     |
| tomi    |
| traci   |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ch', 'name', 1 AS fuzziness, 3 AS expansion_len);" | tail -n +4 | sort
––– output –––
+-------+
| chang |
| chi   |
| chung |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| page    |
| paige   |
| palma   |
| palmer  |
| paris   |
| parker  |
| pat     |
| patrick |
| paul    |
| paz     |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('gr', 'name', 1 AS fuzziness, 'ru' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+------------+
| grace      |
| gracia     |
| grady      |
| graham     |
| grant      |
| gregg      |
| gregory    |
| griffin    |
| grover     |
| montenegro |
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); select * from t where match('somethin') option fuzzy=0;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "select * from t where match('somethin') option fuzzy=0;"
––– output –––
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
+-----------+
| query     |
+-----------+
| some      |
| something |
+-----------+
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
+-----------+
| query     |
+-----------+
| some      |
| something |
+-----------+
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(a int);"
––– output –––
––– input –––
mysql -h0 -P9306 -e "select * from t option fuzzy=1;"
––– output –––
ERROR 1064 (42000) at line 1: unknown option 'fuzzy'
––– input –––
mysql -h0 -P9306 -e "drop table if exists comment_28798446; create table comment_28798446(id int, content text) min_infix_len='3';"
––– output –––
––– input –––
mysql -h0 -P9306 -e "insert into comment_28798446 values (1, 'business Manticore interaction'), (2, 'buisness Manticore interation'), (3, 'other text content');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('buisness Manticore interation') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id   |
+------+
|    1 |
|    2 |
+------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('business Manticore interaction') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id   |
+------+
|    1 |
|    2 |
+------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('Manticore') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id   |
+------+
|    1 |
|    2 |
+------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', 'ru,us,ua' AS layouts);"
––– output –––
+----------+
| query    |
+----------+
| business |
+----------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', '' AS layouts);"
––– output –––
+----------+
| query    |
+----------+
| business |
+----------+
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; CREATE TABLE t(f TEXT) min_infix_len='2';"
––– output –––
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES (1, 'abcdef'), (2, 'abcd efgh');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef'); SHOW META;"
––– output –––
+------+--------+
| id   | f      |
+------+--------+
|    1 | abcdef |
+------+--------+
+----------------+--------+
| Variable_name  | Value  |
+----------------+--------+
| total          | 1      |
| total_found    | 1      |
| total_relation | eq     |
| time           | #!/[0-9]{1}.[0-9]{3}/!#  |
| keyword[0]     | abcdef |
| docs[0]        | 1      |
| hits[0]        | 1      |
+----------------+--------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1; SHOW META;"
––– output –––
+------+-----------+
| id   | f         |
+------+-----------+
|    1 | abcdef    |
|    2 | abcd efgh |
+------+-----------+
+----------------+-------+
| Variable_name  | Value |
+----------------+-------+
| total          | 2     |
| total_found    | 2     |
| total_relation | eq    |
| time           | #!/[0-9]{1}.[0-9]{3}/!# |
+----------------+-------+
––– input –––
grep -A3 "SELECT \* FROM t WHERE MATCH('abcdef')" /var/log/manticore/query.log
––– output –––
/* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 1 */ SELECT * FROM t WHERE MATCH('abcdef');
/* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 2 */ SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1;
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('nonexistent'); SHOW META;"
––– output –––
+----------------+-------------+
| Variable_name  | Value       |
+----------------+-------------+
| total          | 0           |
| total_found    | 0           |
| total_relation | eq          |
| time           | #!/[0-9]{1}.[0-9]{3}/!#       |
| keyword[0]     | nonexistent |
| docs[0]        | 0           |
| hits[0]        | 0           |
+----------------+-------------+
––– input –––
for i in {1..100}; do mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef') OPTION fuzzy=1;" & done
––– output –––
+ [1] 399
+ [2] 400
+ [3] 401
+ [4] 402
+ [5] 403
+ [6] 404
+ [7] 405
+ [8] 406
+ [9] 407
+ [10] 408
+ [11] 409
+ [12] 410
+ [13] 411
+ [14] 412
+ [15] 413
+ [16] 414
+ [17] 415
+ [18] 416
+ [19] 417
+ [20] 418
+ [21] 419
+ [22] 420
+ [23] 421
+ [24] 422
+ [25] 423
+ [26] 424
+ [27] 425
+ [28] 426
+ [29] 427
+ [30] 428
+ [31] 429
+ [32] 430
+ [33] 431
+ [34] 432
+ [35] 433
+ [36] 434
+ +------+-----------+
+ | id   | f         |
+ +------+-----------+
+ |    1 | abcdef    |
+ |    2 | abcd efgh |
+ +------+-----------+
+ [37] 435
+ [38] 436
+ [39] 437
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
+ [40] 438
+ [41] 439
+ [42] 440
+ [43] 441
+ [44] 442
+ [45] 443
+ [46] 444
+ [47] 445
+ [48] 446
+ [49] 447
+ [50] 448
+ [51] 449
+ [52] 450
+ [53] 451
+ [54] 452
+ [55] 453
+ [56] 454
+ [57] 455
+ [58] 456
+ [59] 457
+ [60] 458
+ [61] 459
+ [62] 460
+ [63] 461
+ [64] 462
+ [65] 463
+ [66] 464
+ [67] 465
+ [68] 466
+ [69] 467
+ [70] 468
+ [71] 469
+ [72] 470
+ [73] 471
+ [74] 472
+ [75] 473
+ [76] 474
+ [77] 475
+ [78] 476
+ [79] 477
+ [80] 478
+ [81] 479
+ [82] 480
+ [83] 481
+ [84] 482
+ [85] 483
+ [86] 484
+ [87] 485
+ [88] 486
+ [89] 487
+ [90] 488
+ [91] 489
+ [92] 490
+ [93] 491
+ [94] 492
+ [95] 493
+ [96] 494
+ [97] 495
+ [98] 496
+ [99] 497
+ [100] 498
+ [1]   Exit 1                  mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef') OPTION fuzzy=1;"
+ [2]   Done                    mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('') OPTION fuzzy=1;"
––– output –––
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('$#@!') OPTION fuzzy=1;"
––– output –––
-
+ bash: !': event not found
+

@PavelShilin89 PavelShilin89 merged commit c416864 into update-buddy-version Nov 24, 2024
24 checks passed
djklim87 added a commit that referenced this pull request Nov 26, 2024
* Bump buddy version to: 3.0.1 24111207 5d89277

* Bump buddy version to: 3.0.1 24111217 6707485

* Bump buddy version to: 3.0.1 24111305 f599a87

* Bump buddy version to: 3.0.1 24111407 3861c6b

* Bump executor version to: 1.1.21 24111510 8254967

* Bump executor version to: 1.1.23 24111613 dbade9d

* Bump buddy version to: 3.0.1 24111904 1fdeec2

* Bump mcl version to: 2.3.1 24112219 edadc69

* Bump executor version to: 1.2.1 24112407 aedd870

* 🆕 Update buddy version (fix/fuzzy-no-match) (#2756)

* Bump buddy version to: 3.0.1 24111207 5d89277

* Bump buddy version to: 3.0.1 24111217 6707485

* Bump buddy version to: 3.0.1 24111305 f599a87

* Bump buddy version to: 3.0.1 24111407 3861c6b

* fixed buddy reply routing at daemon for /cli endpoint (#2734)

* fixed buddy reply routing at daemon for /cli endpoint; fixed #2269

* implemented jieba_user_dict_path (#2735)

implemented jieba_user_dict_path

* added log of the SphinxQL query that successfully processed by buddy into the query log; fixed #2235

* manual: Update Adding_documents_to_a_real-time_table.md

* fixed query wrong length at error report at the query log; fixed new lines at the query log for error report and buddy report; fixed #2235

* Update regex for the new version of fluentbit (#2738)

Co-authored-by: Pavel_Shilin <[email protected]>

* manual: Update Query_logging.md

Added that queries processed through Buddy are not logged in plain mode.

* manual: minor changes

* fix crash when add 1-st stored column

That is very edge case when you alter a table adding stored column when
there were no stored columns before.

Test provided.

That is related to #2708

* fixed JSON SI-related filter transforms vs small index

* added collation support to Expr_JsonFieldIn_c

* added log of the HTTP request that successfully processed with buddy into the query log; fixed #2235

* manual: WSL installation

* fixed multiple stopwords from the lemmatize_xxx_all tokenizers increase hitpos of the following tokens; fixed #2704; added case to test 219

* fixed nsis builder script to use the same MANTICORE_DATE as zip package has

* Test/drop sharded table (#2651)

* Creating files for the test

* Update test-drop-sharding-table.rec

* Moved test-drop-sharding-table

* Deleted buddy_path = manticore-executor /workdir/src/main.php

* Added new sharded tables

* Added new outputs

* Fixed test-drop-sharding-table.rec

* Added new cases for table deletion

---------

Co-authored-by: Pavel_Shilin <[email protected]>

* fixed mysql dll for indexer

* set session meta for the buddy replies; fixed #2235

* added uuid_short select list expression function; fixed #2752; added cases to test 125

* manual: uuid_short()

* Test/create table with data if not exists (#2760)

* Update test-create-table-like-existing-table-with-data.rec

* Added cases with different syntax of IF NOT EXISTS support

---------

Co-authored-by: Pavel_Shilin <[email protected]>

* New fuzzy search and autocomplete cases have been added

---------

Co-authored-by: githubmanticore <[email protected]>
Co-authored-by: Stas <[email protected]>
Co-authored-by: Ilya Kuznetsov <[email protected]>
Co-authored-by: Sergey Nikolaev <[email protected]>
Co-authored-by: Pavel_Shilin <[email protected]>
Co-authored-by: Aleksey N. Vinogradov <[email protected]>

* Bump buddy version to: 3.0.1 24112509 84d7b85

* 🆕 Update buddy version (fix/kafka-view-creation) (#2780)

* 🆕 Update mcl version (#2769)

* Bump buddy version to: 3.0.1 24111207 5d89277

* Bump buddy version to: 3.0.1 24111217 6707485

* Bump buddy version to: 3.0.1 24111305 f599a87

* Bump buddy version to: 3.0.1 24111407 3861c6b

* Bump executor version to: 1.1.21 24111510 8254967

* Bump executor version to: 1.1.23 24111613 dbade9d

* Bump buddy version to: 3.0.1 24111904 1fdeec2

* Bump mcl version to: 2.3.1 24112219 edadc69

---------

Co-authored-by: githubmanticore <[email protected]>
Co-authored-by: Ilya Kuznetsov <[email protected]>

* Bump buddy version to: 3.0.1 24112312 dec35d2

---------

Co-authored-by: githubmanticore <[email protected]>
Co-authored-by: Ilya Kuznetsov <[email protected]>
Co-authored-by: Klim Todrik <[email protected]>

---------

Co-authored-by: githubmanticore <[email protected]>
Co-authored-by: Ilya Kuznetsov <[email protected]>
Co-authored-by: Stas <[email protected]>
Co-authored-by: Sergey Nikolaev <[email protected]>
Co-authored-by: Pavel_Shilin <[email protected]>
Co-authored-by: Aleksey N. Vinogradov <[email protected]>
Co-authored-by: Klim Todrik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants