If no mappings are defined, elasticsearch wil use a standard analyzer when
indexing/searching the documents.
The string fields of your document go through an analysis process,
and "Mohsin" becomes "mohsin", "Husen" => "husen", "smh...@gmail.com" =>
"smh.. gmail.com"
If you wan to keep your boolean query, you can use query_string or field
queries instead of term queries:
{
"query": {
"bool": {
"should": [
{
"term": {
"email": "smh...@gmail.com"
}
},
{
"field": {
"firstName": "Mohsin"
}
},
{
"field": {
"lastName": "Husen"
}
}
]
}
}
}
Since you are searching for email addresses, you should definitely use a
specific mapping for your document type and look at UAX Url Email Tokenizer
-- Tanguy
Le lundi 5 novembre 2012 16:54:28 UTC+1, mohsin husen a écrit :
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.