Thierry Lanfranchi
2005-Dec-01 10:55 UTC
[Fedora-directory-users] Server Side Sorting limitations/configuration
Hello, I''ve noticed a strange behavior when I do a substring search based on only one letter, my results are not sorted. When I search for (&(objectClass=inetOrgPerson)(sn=FA*)), I get immediate sorted results, but when I search for (&(objectClass=inetOrgPerson)(sn=Y*)), I get immediate results, unsorted, despite results being less numerous than previous requests'' results. Is that "not sorting on single letter search" feature wanted (maybe even RFC stuff that I haven''t read yet), and if so, can I enable sorting even in that case, or is it to be considered a strange behavior and I need to look for more informations in order to solve it ? Just in case, my user class is not inetOrgPerson, but a class I defined inheriting from inetOrgPerson with added attributes. Mentionning it just in case... Thanks in advance for your answers, Thierry
Chen Shaopeng
2005-Dec-01 11:30 UTC
Re: [Fedora-directory-users] Server Side Sorting limitations/configuration
Thierry Lanfranchi wrote:> Hello, > > I''ve noticed a strange behavior when I do a substring search based on > only one letter, my results are not sorted. > When I search for (&(objectClass=inetOrgPerson)(sn=FA*)), I get > immediate sorted results, > but when I search for (&(objectClass=inetOrgPerson)(sn=Y*)), I get > immediate results, unsorted, despite results being less numerous than > previous requests'' results. >Heh, that''s a funny thing. How can the result of the second query "less numerous" than the result of the first query? Just wondering. csp -- Chen Shaopeng http://www.idsignet.com
Thierry Lanfranchi
2005-Dec-01 12:30 UTC
Re: [Fedora-directory-users] Server Side Sorting limitations/configuration
Chen Shaopeng
2005-Dec-01 12:51 UTC
Re: [Fedora-directory-users] Server Side Sorting limitations/configuration
Thierry Lanfranchi wrote:> (maybe you didn''t notice both search filters were not using the same > first letter ?) >Sorry, didn''t pay attention to that, it means I need to go home and get some sleep now :) csp -- Chen Shaopeng http://www.idsignet.com
David Boreham
2005-Dec-01 15:36 UTC
Re: [Fedora-directory-users] Server Side Sorting limitations/configuration
Thierry Lanfranchi wrote:> Is that "not sorting on single letter search" feature wanted (maybe > even RFC stuff that I haven''t read yet), and if so, can I enable > sorting even in that case, or is it to be considered a strange > behavior and I need to look for more informations in order to solve it ?Yes. One clue might be that a single letter substring search filter will not be indexed (while a leading two-letter substring search filter will). An unindexed search may not be sortable : it''s been a long time since I messed with this part of the code and without reading it again I''m not sure. Anyway, if you made the sort control mandatory in your search, the server should respond with an error in the case that it''s unable to sort. Did you see any response control with information like that in it ?
Thierry Lanfranchi
2005-Dec-05 10:55 UTC
Re: [Fedora-directory-users] Server Side Sorting limitations/configuration
Sorry for the slow answer, I''ve been busy reinstalling my dev platform :) I don''t get any error message while using FDS''s version of ldapsearch with "-x" option to enable server side sorting, and can''t enable debugging as I''d have to recompile the ldapsearch utility with LDAP_DEBUG defined. As I don''t have access to all necessary librairies for now, it''s not an option. There''s no error message in any of the three logs (access, error and audit). I can confirm though that when I do a one-letter substring search, the search seems as slow as an unindexed search, so I guess you''re right about oneletter searches being non-indexed. Do you think there is anything I can do to enable oneletter indexes ? Thanks in advance, Thierry Lanfranchi (PS: Sorry if my english''s not that good, trying to do my best as it''s not my mother tongue) David Boreham a écrit :> Thierry Lanfranchi wrote: > >> Is that "not sorting on single letter search" feature wanted (maybe >> even RFC stuff that I haven''t read yet), and if so, can I enable >> sorting even in that case, or is it to be considered a strange >> behavior and I need to look for more informations in order to solve it ? > > > Yes. One clue might be that a single letter substring search filter > will not be indexed (while a leading two-letter substring > search filter will). An unindexed search may not be sortable : it''s > been a long time since I messed with this part of the > code and without reading it again I''m not sure. Anyway, if you made > the sort control mandatory in your search, > the server should respond with an error in the case that it''s unable > to sort. Did you see any response control with > information like that in it ? > > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users > >