Collection and Key

This page provides detailed descriptions of two indexed fields of face entities.

Collection and Key are two indexed fields of face entities when added to the database. In general, they share the same properties and are interchangeable. Taking care of legacy service users, we keep these nominal names to represent the use of data partition and external user key in AnySee.


Collection

Unlike traditional facial recognition services, AnySee does not enforce the creation of any data layers before adding or searching face entities. However, we offer a collection field to simulate that function.

To use collection, include the value in the request body when calling the create API. It will be accepted if the string complies with the format. No real collection is created, but it works more like a tag when listing and searching since it is an indexed field. Due to this nature, there is also no limit on the number of collections you can create. You can call without the collection field if your dataset is small enough. The value will be blank ("").

The main benefit of using this tag-like field is that it offers more search flexibility. You can narrow the search range to a specific collection or search across the whole tenant by quickly changing one body parameter in the request body. Also, it reduces your efforts to manage the collection.

The only demerit of this function is when you want to drop the whole collection, there is no easy way to achieve that. But If you drop the collection daily, we offer the TTL function to clear unneeded data automatically. In the future, we will also consider batch APIs to delete a specific range of data in just one request.


Key

The Key field in AnySee is expected to store the user's external unique ID, such as an employee or customer ID. However, our service does not check the uniqueness when creating the resources. Please check it yourself. On the other hand, if you want to store multiple face entities of the same person, you can add the same value. Using the metadata function we created, you can give the face entity an image ID.

The input of Key is optional. If you do not include it in the request body, the value will be blank ("").