Bug 143207

Summary: kabc silenty completes after the 1000 record limit
Product: kresources Reporter: Ritesh Raj Sarraf <kde-bugs>
Component: ldapAssignee: Tobias Koenig <tokoe>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Workaround

Description Ritesh Raj Sarraf 2007-03-19 09:05:26 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Debian testing/unstable Packages

Hi,

I'm not sure if people have come across this problem.

If you're using Kontact as your PIM Application and KAB as your Address Book 
application, you can configure your address book to contact the exchange 
(ldap) server to get all the address records.

The problem is that either ldapsearch or exchange has put a restriction of max 
1000 records per query. (You can verify that with the ldapsearch command. 
It'll terminate after receiving 1000 records).

I think kabc's ldap code also inherits the same bug and is only able to fetch 
1000 records, after which it silently keeps quiet (It should rather have 
popped up an error message). Or else have a workaround in place to fetch all the records bypassing this limit

I'm attaching a workaround (in Python) which fetches all the records.
But there still is a problem. With the workaround in place, I end up with 9000 records. This should be a normal case in any huge organization. But when typing the contact in the "To:" box of Kmail's composer, it ends up being very slow because of the large number of records.
Kmail should be able to efficiently filter the contact (as typed) from the large number of records.
Comment 1 Ritesh Raj Sarraf 2007-03-19 09:06:56 UTC
Created attachment 20030 [details]
Workaround
Comment 2 Ritesh Raj Sarraf 2007-03-19 09:10:53 UTC
Oops!! The subject should actually be "kabc silenty exits after the 1000 record limit"
Comment 3 Ritesh Raj Sarraf 2007-05-05 21:25:17 UTC
I was just going through the list of bugs and thought a little more about this bug. I noticed that when my box is connected to the network, kabc is able to connect to the ldap server and fetch results on the fly (well, not all but most).

The bug really is in the "Offline Use" option in the "Use local copy if no connection". I guess when this option is selected, kabc (or the ldap query code) queries the ldap server in one go and hits the 1000 records limit.
Comment 4 Ritesh Raj Sarraf 2009-07-30 18:05:09 UTC
Don't think this really applies to kab because server policy is something kab can't take care of.