none
Active Sync - LongID validity for Search Command RRS feed

  • Question

  • Is LongID valid for the particular Search Command Session or is it valid until the next Search Command?
    Monday, January 30, 2012 10:29 PM

Answers

  • Yes, that's right.  L1 uniquely identifies the message, folder, calendar item in that result element.  Therefore, L1 will be valid as long as that item is not deleted on the server (or moved). 

    Tom

    • Marked as answer by AuroraB13 Thursday, February 9, 2012 7:01 PM
    Thursday, February 9, 2012 4:26 AM
    Moderator

All replies

  • AuroraB13,

    Thank you for your question.  An engineer from the protocols team will contact you soon.

     

     

     


    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team
    Monday, January 30, 2012 11:17 PM
    Moderator
  • Hi AuroraB13,

    The LongID value can be used in, for example, the ItemOperations to refer to one unique Search result set.  So are you, in effect, asking how long a search result is valid on the server?

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    Tuesday, January 31, 2012 12:36 AM
    Moderator
  • Yes, How long is that search reseult valid on the server. As in if I cache the search result, how long should I expect it to be valid on the server?
    Tuesday, January 31, 2012 3:46 PM
  • AuroraB13,

    Thanks for the confirmation, I'll look into this and get back to you as soon as I have answer.

    Tom

    Tuesday, January 31, 2012 6:51 PM
    Moderator
  • Any Updates ?
    Monday, February 6, 2012 4:52 PM
  • Hi  AuroraB13,

    Thanks for your patience.  The LongID is unique to each item in a result set of a Search command response.  The Search command response can have possibly multiple Result elements, each referring to a unique item like an email, folder, calendar item, etc…  The LongID for each Result element’s item uniquely identifies that item and won’t change unless that item is deleted or moved to a new folder (since this is effectively a copy/delete operation).  

    [MS-ASCMD] 2.2.3.132.2  Result (Search) says, “There is one Result element for each match that is found in the mailbox. If no matches are
    found, an empty Result element is present in the Store container element of the response XML.”

    So, to answer your original question, the LongID is unrelated to the duration of a Search command session.  It is simply referenced by the Search command Result to refer to a specific item in the mailbox.

    Does that make sense?

    Tom

    Tuesday, February 7, 2012 1:19 AM
    Moderator
  • Ok.

    Lets, consider the following scenario

    1)- Search Query 1 - q1 returned a result with LongID - "L1"

    2)- Search Query 2 - q2 returned a result with LongID - "L2"

    3) Now, can I still use "L1" in an ITEM_OPERATIONS command to Fetch any properties of that message item?

    As you mentioned earlier that "The LongID for each Result element’s item uniquely identifies that item and won’t change unless that item is deleted or moved to a new folder" , I would assume the answer to my question in step 3 above would be YES.

    Wednesday, February 8, 2012 8:11 PM
  • Yes, that's right.  L1 uniquely identifies the message, folder, calendar item in that result element.  Therefore, L1 will be valid as long as that item is not deleted on the server (or moved). 

    Tom

    • Marked as answer by AuroraB13 Thursday, February 9, 2012 7:01 PM
    Thursday, February 9, 2012 4:26 AM
    Moderator
  • Thank you for the info. I appreciate it.
    Thursday, February 9, 2012 7:02 PM