Determine if a string does not exist - is unique

Unsure of what terminology to use here.

Been asked to create a UI to ensure that a new value is unique in the system. For example, on the registration page ensuring the username value being entered is not already in use.

Is this a pattern that is feasible with Algolia? Any doc links, examples or other pointers?


Hey there!

You’re looking for the ability to do exact matching against the index. It’s a bit challenging because you’ll be working against the pre-fix first, typo tolerant capabilities of the index, but it’s definitely doable.

This thread has a couple of suggestions, particularly if the username is the unique key/objectID of the record.

It takes a little work, but you can do it if you prefer the front end only interacts with your user records via the index, but you may also want to consider going directly to the user database for this sort of thing.