I want to find users based on a list of usernames. the list of the username might contain partial usernames and will come from a web application.
var userNames = new List<string> (...); // not sure how many!
LINQ:
var userEntity = allUsers.Where(p=> userNames.Any(x=> p.UserName.Contains(x)))
NEST: ???
must.Terms(t => t.Field(f => f.UserName).Terms<string>(usernames))
but this only returns the exact matches and not the partials.
How would you translate the above LINQ query into NEST (ElasticSearch)?