Let's say I have the word "catheter". A user tries to search on my web app for that word but spells it "cathiter" or "cattiter" instead. How can I use SphinxQL to match the word from my SQL database based on the incorrectly spelled word? What would my query look like? Do I need to enable something in my index on my conf file? From my understanding, enable_star has been deprecated.
Asked
Active
Viewed 370 times
1 Answers
1
Yes, enable_star=0
has been depreciated, but not sure how that relevant!
Anyway sounds like you want the CALL SUGGEST
function
http://sphinxsearch.com/blog/2016/10/03/2-3-2-feature-built-in-suggests/
The defuult settings a good place to start...
CALL QSUGGEST('cathiter','yourindex');
... if you dont min_infix_len
defined on index, will need that. Alao dict=keywords
- for some reason that requirement not mentioned in blog post.

barryhunter
- 20,886
- 3
- 30
- 43
-
Thank you Barry. How would I use this, for example, "SELECT * FROM test CALL QSUGGEST ('cathiter')"? – Hayden Feb 22 '18 at 00:06
-
...keep in mind too I am brand new to Sphinx. I needed advanced search capabilities for a web project of mind and decided a few days ago to take it up. – Hayden Feb 22 '18 at 00:10
-
1Error is thrown "error 1604 (42000) no such built-in procedure" upon entering in terminal – Hayden Feb 22 '18 at 00:26
-
Ah, well in the blog post *In Sphinx 2.3.2 we introduced several new features, one of them being the correction suggestions* ... so may need to upgrade to 2.3.2 or above. Although its its not used with SELECT, its the query literally starts with the word CALL ! – barryhunter Feb 22 '18 at 09:40
-
May have just been an older version in the Ubuntu repositories I am using. – Hayden Feb 22 '18 at 14:51
-
when you first connect to sphinx using `mysql` client terminal, it should report the sphinx version. – barryhunter Feb 22 '18 at 18:01
-
Ok. What I am trying to do is create an advanced search engine for my website. I have a mysql table that displays place names, addresses, along with tag names related to these places. The tags are separated by commas. When a user types in a tag name or the name of a place, I want it to pull up everything from that row. I am wanting to use SphinxQL instead of the SphinxClient () object because apparently it does not exist. – Hayden Feb 22 '18 at 18:40
-
ok, but that adds nor clarifies anything in relation to your question. – barryhunter Feb 22 '18 at 23:48
-
How do I download the latest version from the Ubuntu cli/terminal? – Hayden Feb 24 '18 at 05:54
-
Well you want 2.3.2, (to get CALL SUGGEST anyway!), so goto http://sphinxsearch.com/downloads/archive/ and pick an approicate version. (it will download the file to your local computer, to download direct to the remote server, easest I found is to right click the 'If it hasn't, click here.' link at top, can grab the url, then can just download that on the machine eg `wget http://sphinxsearch.com/files/sphinxsearch_2.3.2-beta-1~trusty_i386.deb` (thats just a version I picked at random, pick the right one for your release!) – barryhunter Feb 24 '18 at 13:40
-
Error being thrown in terminal...dependancy problems prevent configuration of sphinxsearch:i386 – Hayden Feb 24 '18 at 22:34
-
Error: /usr/bin/indexer no such file or directory – Hayden Feb 25 '18 at 05:48
-
When I use the suggest function, it states 'Error 2013 (hy000) lost connection to mysqli server during query'. – Hayden Feb 26 '18 at 03:49