-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User is not found when is searched by name and one of surnames #7510
Comments
We tested Nextcloud 13 beta1, available in Nextcloud website. In this version, search by name keeps working like previous releases. For every word that you types the wildcard '*' is only append to string, never prepend to it. We know that can reduce performance, but it's better to be slow than don't find users. But if it could be enabled by configuration, current behaviour can be kept as default behaviour. For example (for case of my search attributes be "cn", "sn" and "givenName"): dn: uid=4815162342,ou=sec,ou=sec2814,dc=corps,dc=gov,dc=br Only way to find this user is typing "roger" or "luis". In Brazil, names of people are long. There are people with a name and three or four surnames. Beyond that, in Brasil the first name can be simple or composed. So it is hard to be a 'perfect' register in LDAP. |
cc @nextcloud/ldap |
The search goes via LDAP. Typically, you'd define seperate User Search Attributes, mostly it is "sn" and "givenName", but it depends on your use of LDAP. Then the order of the name does not matter. |
@blizzz, really the order of terms in search doesn't matter. Problem is that application user (who makes searches) doesn't know how user register was built in LDAP. |
@fgsl this is mostly an LDAP issue, sorry. Either abouts is'ts config, structure or search abilities. When a search term contains a space, we already take them as single words and compare every configured attribute against "word1*", "word2*", etc. It's possible to make it work by prepending the asterisk in front, however this kills performance totally because LDAP cannot make use of any index. You basically have a (multiple) full table read. This is just not acceptable and an even worse UX. If possible, split up the sn parts into a differnet attribute. It might be that you can work with multi value attributes, and insert each single surname as a seperate value. Create an index on LDAP for it and use this as search attribute. I didn't try it so i am not sure it works, but I think it's likely. |
Hi, @blizzz. Performance issue of LDAP is known but customer should have right to choose that configuration or not (Owncloud has a reservation about performance if customer decides to use that option). |
Well, as said you can prepend * to your searches. Otherwise I'll accept a hidden (→ occ only) per-config setting pull request (or talk to Sales ;) ) |
@blizzz , excuse me, I didn't understand what could be a hidden per-config setting. Are you talking about not including that in documentation? |
I would still like to have this properly documented instead of adding another hidden feature that adds more code. You could simply search for "*eyer" to find "Meyer" aswell as "Beyer" in the search field. |
I have submitted a new proposal, where asterisk is introduced among words. |
I am closing this issue because it seems that change don't generate an advantage for all. |
Premise
User backend in LDAP
Steps to reproduce
Expected behaviour
User must be found using name and one of surnames
Actual behaviour
User is found only if search uses name and first of surnames
Constraint
Behaviour must be defined by configuration (config.php). Default must be actual behaviour. Expected behaviour must be enabled by key user_ldap.enable_medial_search equals to true.
The text was updated successfully, but these errors were encountered: