Problem with search

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • biobill
    Junior Member
    • Jul 2017
    • 2

    Problem with search

    Hi!
    I have a problem with searching in espo.
    I have a database with about 5000 accounts. When I search an account's name it doesn't gives me the result.
    For example, lets say that I have a client with name (in one field) "Doe John". When I search for "Doe" or "Doe John" there is no problem. When I search for all clients named "John" it displays some but not all of them and definitely not Doe John.
    I searched in log files but I didn't find anything relative.
    Can anyone help in this?

    Thanks in advance
    Vasilis
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello

    Use '%' before -> '%John'
    By default it searches like "starts with", it is equals sql-language " LIKE '{input_text}%' ".

    Comment

    • biobill
      Junior Member
      • Jul 2017
      • 2

      #3
      Thank you Tanya!
      It worked fine

      Comment

      • mmandell
        Member
        • Jul 2014
        • 99

        #4
        Can we have this % on by default?
        Without it, search is not as valuable.

        Comment

        • tanya
          Senior Member
          • Jun 2014
          • 4308

          #5
          To enable '%<term>%' support in all the search boxes add

          'textFilterUseContainsForVarchar' => true

          to your data/config.php file.

          Comment

          • SvSe81
            Junior Member
            • Mar 2018
            • 3

            #6
            It works fine, if I enter a Minimum of 4 characters. It does not work for 3 characters (e.g. search for FTP).

            Is it possible to set the minimum to 3 characters?

            Thanks in advance

            Sven

            Comment

            • tanya
              Senior Member
              • Jun 2014
              • 4308

              #7
              Hello
              global core - https://github.com/espocrm/espocrm/b...s/Base.php#L65
              any modification is not upgrade save

              if you need it for specified entity, better is to override entity SelectManager and define this const as 3
              (https://forum.espocrm.com/forum/deve...m-field-values)

              Comment

              Working...