Search code examples
guidfilenet-p8filenet-content-engine

Are GUID across Object Stores in FileNet CE 5.2 unique?


I have a requirement wherein I need to search for Documents using only GUID across Object Stores. 1. Is it possible that GUID is duplicate across Object Store ? 2. In such a case where GUID is duplicate, how do I retrieve the Document Content ?


Solution

    1. Is it possible that GUID is duplicate across Object Stores ?

    As the name says, global unique identifier (GUID) is unique. Here the scope 'global' is limited to an Object Store. So, Yes. When you are dealing with multiple object stores, it is possible that you encounter the situation where objects having same GUID but belong to different object stores. However, this situation is highly unlikely if you let FileNet to generate the GUID for you as FileNet generates the Id randomly.

    In v5.2.1, a new algorithm is used to generate the Id monotonically having mixed time and counter based portions with a random portion. I believe this would completely elemenate the odds of having same Id occurrence for the objects from different object stores.

    However, if you use FileNet Deployment Manager for migration, it lets you keep the same Id for the objects that you are migrating.

    1. In such a case where GUID is duplicate, how do I retrieve the Document Content ?

    This would only happen when your search scope involves multiple object stores and your SQL with where clause "Id={....}" returns a DocumentSet containing 2 instances(if you are using MergeMode.UNION). If you know from which object store you want the document from, you'll know which instance's content you want to retrieve.

    If your search scope involves only one object store then you'll find only one Document instance for the GUID given.