Hello friends,
I`m using SimpleSearch to search my content and I cannot figure out how to configure it, so that I can search case insensitive. It always needs a case sensitive input string to show the correct results.
Does anyone have an idea?
To be more specific: when I type in ’Test’ it would show all results for ’Test’ and ’test’. So that way around it works.
But when I type in ’test’ it only shows the results for ’test’ but not ’Test’.
I would be very thankful if anyone knows how to fix this issue. I am working on a project right now and its kind of important that I figure out how to implement the search functionallity correctly.
Please, if anybody knows an answear to my problem it would be so awesome and I would give him / her 1000 karma points.
for me it works fine what is your version modx and simplesearch?
coding Java Android and NDS
-
☆ A M B ☆
- 3,141 Posts
What’s your database collation set?
If it’s set to, for example, utf8_bin, that will save your data in a binary format, which is case sensitive.
If it on the other hand is utf8_general_ci you will see that "ci" at the end, which means it is case insensitive.
I think that’s what’s going on here
That is a great idea and I didn´t know this. And you were right, the collation of my database was set to utf8_bin. So now I changed it to utf8_general_ci, using phpmyadmin, like you said. I even saved one of the ressources I want to show up in the search again, but its still not working.
Besides changing the collation of my database, is there anything I forgot to change, maybe in MODX or so?
I know I am getting there, with your help and I am very greatful for that. Thank you very much so far.
-
☆ A M B ☆
- 3,141 Posts
I think you should run setup in advanced update mode - MODX saves the collation as well I think (the config file comes to mind) which may cause it sending a different collation along with the queries and "overriding" it, so to speak.
For anyone else struggling with this - you need to set the collation on each field and each table as well as for the database. No need to rerun setup (on 2.2.1 at least)