Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

MS-DLX (Microsoft Lync) and contact search

Developers
2012-03-06
2013-03-28
  • Hello all.

    I see that git tree contains set of commits for upcoming 1.13.0 release: among these theere is MS-DLX (http://msdn.microsoft.com/en-us/library/cc431520%28v=office.12%29.aspx) support for searching contact on a Lync server.

    However these use the 'ChangeSearchRequest' method which seems (http://www.scribd.com/doc/76414957/Chapter-01-Address-Book-Service) to search on exact matches for given user attribute(s).

    I can confirm such behaviour against our Lync server installation - and in addition for such searches only a single match is returned.

    Wouldn't it be  more useful to use 'BasicSearch' method which allows for a wildcard matching (well, limited - using filter as 'beginswith' only). ?

    I have a rather 'proof of concept' patch against current git tree (http://cern.ch/jpolok/pidgin-sipe-Lync-search.patch) which allowed me to test the 'BasicSeach' method with success (it is really a proof of concept as it 'butchers' the search dialog quite a lot making it not useable for SIPE without MS-DLX ..) .. if anyone would be interested …

    Cheers

    Jarek

     
  • Stefan Becker
    Stefan Becker
    2012-03-06

    I agree, DLX is a joke compared to the old AD based directory search.

    But BasicSearchQuery is IMHO even worse than ChangeSearchRequest, because you can only have one search value which is compared against multiple fields, either exact or begins-with. This doesn't match up with the UI and user expectation at all.

     
  • Yep, I'm not too impressed either …

    Indeed, only one value can be searched, but the UI (for MS-DLX searches only) could be changed to have a single search input field and a dropdown list of  field names. 

    Current UI is better, but not really useable I fear: at least not in our environment (I'm not sure this concerns all Lync Server setups or only some ?) it is not really possible to find somebody using it - one needs to type in exact match for user firstname/name/etc.. and then MS-DLX returns only single result - and since we are an international organization sometimes it gets tricky to remember correct spelling ….

    Thanks && Cheers

    Jarek

     
  • Stefan Becker
    Stefan Becker
    2012-03-07

    The exact match per field is hard-coded into DLX ChangeSearchQuery, but I think it is at least case insensitive. Plus the results are OR'd not AND'd, i.e. if I search for first name "Foo" and last name "Bar" I get all Foo's and Bar's in the whole directory and not the expected "Foo Bar".

    IMHO the requirements to switch to BasicSearchQuery would be:
        - reliably detect that AD based search is disabled and DLX works, i.e. the plugin can set an internal flag
        - if the flag is set then instead of creating the original UI we create an alternative UI with only one entry field and a description text along the lines of "Enter a string that matches the start of the first name, last name, … you are looking for"
        - if the flag is set use BasicSearchQuery on all fields with begins-with match type

     
  • chathura
    chathura
    2012-10-31

    I have same problem with contact search and I did change on search method to basic search (on sipe 1.13.3)  as follows

    on sipe-buddy.c change DLX_SEARCH_ITEM to basic search as follows (line 436)

    #define SIPE_SOAP_SEARCH_ROW "<m:row m:attrib=\"%s\" m:value=\"%s\"/>"
    #define DLX_SEARCH_ITEM \
    "<BasicSearch>" \
    " <SearchList>%s,displayName,msRTCSIP-PrimaryUserAddress,title,telephoneNumber,homePhone,mobile,otherTelephone,mail,company,country</SearchList>" \
    " <Value>%s</Value>" \
    "<Verb>BeginsWith</Verb>" \
    "</BasicSearch>"

    sipe-svc.c change sipe_svc_ab_entry_reques function as follow

    gboolean sipe_svc_ab_entry_request(struct sipe_core_private *sipe_private,
       struct sipe_svc_session *session,
       const gchar *uri,
       const gchar *wsse_security,
       const gchar *search,
       guint entries,
       guint max_returns,
       sipe_svc_callback *callback,
       gpointer callback_data)
    {
    gboolean ret;
    gchar *soap_body = g_strdup_printf("<SearchAbEntry"
       " xmlns=\"DistributionListExpander\">"
       " <AbEntryRequest>"
       "   %s"
       "  <Metadata>"
       "   <FromDialPad>false</FromDialPad>"
       "   <MaxResultNum>%d</MaxResultNum>"
       "   <ReturnList>givenName,displayName,msRTCSIP-PrimaryUserAddress,title,telephoneNumber,homePhone,mobile,otherTelephone,mail,company,country</ReturnList>"
       "  </Metadata>"
       " </AbEntryRequest>"
       "</SearchAbEntry>",
       search,
       max_returns);
    entries ++;
    ret = new_soap_req(sipe_private,
       session,
       uri,
       "DistributionListExpander/IAddressBook/SearchAbEntry",
       wsse_security,
       soap_body,
       sipe_svc_wsdl_response,
       callback,
       callback_data);
    g_free(soap_body);

    return(ret);
    }

    then return all search results

    This work for me…!

     
  • Stefan Becker
    Stefan Becker
    2012-11-02

    So? You didn't solve any of the problems I listed for BasicSearch. You will only be able to search one item (probably the last you enter) and it will still only match from the beginning of the field.

     
  • chathura
    chathura
    2012-11-29

    After changing to basic search it display all the result under matching keyword