No announcement yet.

Search function does not find any results for words in the middle of name field.

  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I think that changing the query to have % either side of the search text is not really the answer. As pointed out already this is very slow, does not scale and requires user training.

    MySQL provides a special sort of index for solving this problem and it works very well. This does require extra indexes to be created and the SQL within the application has to be modified, but the result would be fantastic.

    I am sure we all have a list of places where we would like this. My recent addition is the text within the body of Knowledge Base items so that I can find the right one.

    For reference I have 250,000 emails indexed in a MySQL database and using this I can find all occurrences of "amy" in a few seconds.

    The link below (not sure how to use this forum correctly) is to the MySQL documentation on full text indices.
    Last edited by MatLudlam; 04-26-2017, 08:22 AM.


    • #17

      EspoCRM requires MySQL 5.1 or newer. Full Text Search is available from 5.6 version.
      Full Text Search feature is planned for the end the year



      • #18
        Fantastic news. I think that will greatly improve the usability (and speed).

        Looking forward to it.


        PS - is the list of future things published anywhere?


        • #19
          No list. The most looks like


          • #20
            Originally posted by bandtank View Post

            Partial string searches are only slow when a real cache layer is absent. I added a Redis cache to my EspoCRM installation by modifying the most common searches to look in the cache first.

            How would one add the %query% search to the custom folder? I don't understand the file structure yet, so I'm not sure where to put it or how to do it.
            Hi - old thread - but is your redis support available online somewhere to look at?

            I'm thinking about working on fuzzy searching involving soundex values and an index table, having redis to cache common queries would make things a lot quicker.


            • #21
              This class has a nice combination of using relevance values from a full text search and soundex values for mispelled words.

              For the fields which are selected as text searchable in EntityManager, every update causes the index to be updated with soundex values for the words in the field. Then searching involves comparing prestored soundex values.


              • #22
                What is the change you made to config.php and does this survive upgrades?