Search behaviour

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pxpto
    Junior Member
    • Sep 2025
    • 2

    #1

    Search behaviour

    Hi,

    I'm having some problems with my users that can't find things because they always forget to use wildcards.

    When they use the search in the Accounts for example:

    "pie" shows accounts that start with "pie"
    "pie*" also shows accounts that start with "pie"
    "*pie" shows accounts that end with "pie"
    "*pie*" shows accounts that contain "pie" either in the beggining, end or middle

    It would be easier for my users that searching for "pie" would give them the accounts containing "pie" either in the beggining, end or middle. With no wildcards. I've tried "Administration > Settings > Use 'contains' operator when filtering varchar fields" but I don't notice any diference. Even after rebuilding. Am I doing something wrong?

    If they specifically want something that "starts with" or "ends with" they can click the advanced search (three vertical dots) and select the options from the combo box. But it would be easier if the "basic" search searches substrings everywhere in the string.

    I'm using EspoCRM v9.1.8

    Thanks!
  • pxpto
    Junior Member
    • Sep 2025
    • 2

    #2
    Found the problem.

    Using "Administration > Settings > Use 'contains' operator when filtering varchar fields" was not enough, because my search word "pie" was too short. There is a "textFilterContainsMinLength" setting that was missing from my config.php (fresh install from v9.1.8) and the fallback value was 4. Setting textFilterUseContainsForVarchar to 3 solved my problem.

    I think that the setting "textFilterContainsMinLength" should at least be included in the config.php so we can know its existence and eventually have a place in the Admin UI.

    So:
    'textFilterUseContainsForVarchar' => true,
    'textFilterContainsMinLength' => 3,

    Now, searching for "pie" I get the accounts containing "pie" either in the beginning, end or middle.

    Hope this helps someone!

    Comment

    Working...