I have a "User" entity with the these properties: id, first_name, last_name, email, etc.
What's the best way to search for a full name? That combining first_name and last name of course. I couldn't find String-contains like query
You could split the full name you want to search for into first name and last name, then perform a query filtered with 2 equality checks on the 2 properties combined with an AND
condition.
The exact syntax depends on the datastore library you use.
And you need to have a composite index for that query.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.