Forums / Developer / Search is too strict..howto change?

Search is too strict..howto change?

Author Message

K259

Monday 15 August 2005 1:46:54 pm

I want that the visitors of my website shall be able to search and get a list of all variations of a word.

How/Where can I implement in EZ that when the vistors searches, then the word search is %searchtext% which gives variations of words, and not that the visitors have to type the exact word?

Gabriel Ambuehl

Tuesday 16 August 2005 1:51:30 am

I once tried this. Only thing I can say for sure isn't very straight forward. It might be easier to write your own module to search through the index...

Visit http://triligon.org

K259

Tuesday 16 August 2005 2:25:17 am

So, it's hard to make this easy little "thing" in eZ? In other cms you can just add % in front or/and after the searchvariable in the sql-query..

Gabriel Ambuehl

Tuesday 16 August 2005 4:24:01 am

Well you could try. I gave up after an hour trying to figure out how exactly the search works.

I might try again when I really need it.

(Someone mentioned that while adding like to queries might work, the functions that format the results could become confused by multiple returns)

Visit http://triligon.org

K259

Tuesday 16 August 2005 4:25:55 am

I really need it, heeeelp :p

Hmm..is this so complicated in ez...do I have to rewrite the total searchengine to achieve this?

David Eriksson

Tuesday 16 August 2005 4:38:42 am

Turn on wildcards?

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/configuration_files/site_ini/searchsettings/enablewildcard

/David

K259

Tuesday 16 August 2005 4:59:14 am

No, don't want to turn on this feature, just want to enable that the user searches in %searchtext% and not has to type the exactly searchword..

Gabriel Ambuehl

Tuesday 16 August 2005 5:27:12 am

Oh, I wasn't aware of the wildcard feature.

What you could probably do: use Javascript or patch the beginning of the search code to change the query to "*searchword*".

I wasnt aware of the wildcard searching feature, that is sweet!

Visit http://triligon.org

K259

Tuesday 16 August 2005 5:38:13 am

It's not sweet when you have lots of users who are searching with the wildcards ....it may make your mysql-db crash..because ez starts to many not so very optimized sql-queries and too many sql queries..

So be careful..

jb bianchi

Wednesday 17 August 2005 1:45:26 am

hi,

In the advancedsearch, we can do the search with :
seach text or phrasesearchtext but not with AnywordSearchText.
Do you know what I have to do to search any words.