We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34753
    • 5 Posts
    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?
      • 34753
      • 5 Posts
      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.
        • 34753
        • 5 Posts
        Please, if anybody knows an answear to my problem it would be so awesome and I would give him / her 1000 karma points.
          • 2048
          • 15 Posts
          for me it works fine what is your version modx and simplesearch?
            coding Java Android and NDS
            • 34753
            • 5 Posts
            I am using MODX Revolution version 2.1.1 and SimpleSearch version 1.4.0.
            I don´t know what might have gone wrong.

            I even reinstalled SimpleSearch to make sure everything installed proparly.

            In my base template I am calling SimpleSearch like this:
            <div id="search_home">
             [[!SimpleSearchForm? &landing=`93` &method=`POST` &tpl=`searchbox`]]
            </div>

            My ’searchbox’ looks like this:
            <form class="sisea_search_form" action="[[~[[+landing:default=`[[*id]]`]]]]" method="[[+method:default=`post`]]">
             <label>
              <span class="search_label_home">HGV-Seite durchsuchen: </span>  
              <input type="text" name="[[+searchIndex]]" value="[[+searchValue]]" size="80" />
             </label>
            </form>

            I am very new to MODX and maybe I´m just using it wrong.
              • 18373 ☆ 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 smiley
                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                • 34753
                • 5 Posts
                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.
                  • 18373 ☆ 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.

                    Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                    Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                    • 34109
                    • 119 Posts
                    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)
                      Studio Republic
                      http://www.studiorepublic.com
                      0845 226 3205
                      @christodhunter