Search Guide
The Search services aim to perform a 1: N query within a provided collection. In other words, a search is conducted in the collection with a provided image to find any type of match. This is useful when authentication processes (login) for previously registered individuals are required.
Which services perform a Search?
Currently, there are five services that perform this process, which are:
These services share the same purpose, conducting a search for previously created individuals in a Collection to find matches.
Similarities in the services
The aforementioned services have some similarities in their structure. Below, we'll show a JSON explaining each of the parameters:
{
"collection_id": "ID_OF_COLLECTION",
"images": [
"base64_encoded_string"
],
"min_score": 0.7,
"search_mode": "FAST/ACCURATE choose one"
}
- collection_id: As mentioned in the explanation of the Collection, this parameter, called code, is generated when creating a Collection properly.
- min_score: This parameter, a number between 0.5 and 1.0, establishes the minimum tolerance for a match when performing a 1:N comparison between the FaceMap and FaceHash in the Collection. This function determines whether the face already exists in the collection or not.
- search_mode: This parameter determines the mode in which the search for the face in the collection will be conducted. There are two possible valid parameters: i) "FAST" for a quick search, and ii) "ACCURATE" for much more precise queries in the collection; the latter value increases the service response times but ensures better mapping to prevent duplicate faces.
- images: An array of images; all images must be of the same person, in Base 64 format, and a maximum of three (3) images can be sent.
Differences in the services
Each service has a specific use depending on the applicable need or use case. Below, you will learn about the differences and the most common scenarios:
- Search 1:N: Standard service for searching matches in the collection. It is recommended for use when you are certain that the person to be searched has undergone liveness detection previously, and their information has been stored in the collection accordingly.