The search box at the top of every layout does not find any result if the search word is not the first word of the name.
Announcement
Collapse
No announcement yet.
Search function does not find any results for words in the middle of name field.
Collapse
X
-
I'm not sure that it's possible. It's a search standard for CRMs. Just teach your employees.
Comment
-
Originally posted by tarasm View PostI'm not sure that it's possible. It's a search standard for CRMs. Just teach your employees.
Comment
-
Just to add to my post about you can add it to global search, fairly easily, by doing the following...
Open file application/Espo/Controllers/GlobalSearch.php
find
PHP Code:$query = $request->get('q');
PHP Code:$query = trim($query, '%');
$query = '%'. $query .'%';
Now I have not looked at, nor do I know where the searches for individual plugins/pages are. However assuming it works in a similar fashion to the global search you could do the same thing. Took me about 5 minutes to find and add this and I did not have enough time to look for where the rest of the search calls were.
Comment
-
Ok, after a little more time to research it looks like in addition to the above change that does a true wildcard search on Global Search, you can also do it on the record list as well by making the very simple change below...
Open file application/Espo/Core/SelectManagers/Base.php
Go to line 1248 and change...
PHP Code:$expression = $textFilter . '%';
PHP Code:$expression = '%'. $textFilter . '%';
Last edited by Clintre; 10-18-2016, 01:22 PM.
Comment
-
It's because text searching is slow, so if you have 10,000's of records it can slow down the queries.
I patch the % in to all text queries as my users have no concept of search modifiers and just expect everything to work like google.
It could be a configurable option in the Admin section ?
- Likes 1
Comment
-
Originally posted by alasdaircr View PostIt's because text searching is slow, so if you have 10,000's of records it can slow down the queries.
I patch the % in to all text queries as my users have no concept of search modifiers and just expect everything to work like google.
It could be a configurable option in the Admin section ?
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.
Comment
Comment