My type is user: email and username.
The email field is set to type string, with a custom analyzer 'exact_lower':
index.analysis.analyzer.exact_lower:
type: custom
tokenizer: keyword
filter : lowercase
The problem is when I search for a full email address it is returning matches as if the '@' was a space. I assume due to it tokenizing the search.
Query I'm sending in:
{
"query" : {
"query_string" : {
"query" : "[email protected]"
}
}
}
It is returning anything matching 'admin' or 'example.com'. E.g. [email protected], [email protected], and [email protected]. I want it to only return [email protected]...
I think I need to tell the search not to tokenize the query_string
, but haven't been able to figure out how to do that.
Any help is much appreciated! Thanks, Seth