I am using ElasticSearch v6.8 and the NEST client, writing C# code. I'm using fluent mapping.
I am indexing an email field, so users can be found by searching their email address. The standard analyzer didn't work, and I then read up on using the uax_url_email
tokenizer. I plugged it in, and it works better than the standard analyzer, but I still can't search using the @ character, or the '.' character. Example: type in "firstname" gets a match. Type in "firstname@" doesn't match. Type in "firstname.lastname" doesn't match either.
What am I doing wrong? I assumed the uax_url_email
tokenizer would handle this. I switched to using NGram instead, and then it works, but it just seems strange that the existing built-in email analyzer doesn't handle the @ sign and similar.
Here's my field mapping (it's a plain string):
.Map<UserSearchEntity>(
m => m
.AutoMap()
.Properties(p => p
.Text(t => t
.Name(n => n.Email)
.Analyzer("user_email_analyzer")))
The analyzer has been registered previously, with the uax_url_email tokenizer.