Reputation: 463
I am using LDAP search whenever user does a key press. Which will cause lot of search in LDAP. For example if i am searching for user Ann
, it will search for A
then An
and then Ann
. Is there some command which will cancel previous search. If I press Ann
, LDAP should stop searching for An
and start new search for Ann
immediately?
This is my code:
deSearch.Filter = String.Format(@"(|{0})", mysearchquery);
SearchResultCollection myresults = deSearch.FindAll();
Upvotes: 0
Views: 68
Reputation: 4878
Yes, you should cancel the previous LDAP operation using the Abandon operation (which has no results, so you cannot be sure it's been abandoned), or the Cancel Extended operation for those servers that are supporting it (OpenDJ, OpenLDAP...).
The idea of introducing a short delay before sending the request is also a best practice.
Upvotes: 1