Forums / General / Substring search
Gabriel Ambuehl
Tuesday 18 January 2005 11:53:32 am
Is there any way I can enable substring searches? This is a major deal in German which uses loads of concatenated nouns but also in other languages and with lazy users. This shouldn't be too hard (might be as simple as changing WHERE field='keyword' clauses to WHERE field like '%keyword%' to do...
Also, how about soundex searches / different spellings of the same word, but that's obviously a lot harder than substring searches ;-)
Visit http://triligon.org
Jo Havik
Wednesday 19 January 2005 5:15:36 am
There is no easy way to search for substrings (at least as I know :). The '%keyword%' approach does not work since the structure of the search engine cannot cope with the possibility of a SQL query returning more than one word (an exact match). Cannot remember the details, havent looked at this for some time.
We have, however, created a patched version of the search engine (for eZ publish v. 3.4) that indexes substrings of each word. This works, but your database will grow quite large..
Let me know if you want me to send this patch to you.
Jo H
-- Jo Havik / jo.havik at bodonihus.no