Zhen_Wu
(Zhen Wu)
October 31, 2012, 9:48am
1
curl -XPOST 'http://localhost:9200/twitter/tweet' -d '{
"user" : "user1",
"mail" : "user1@domain1.com"
}
'
curl -XGET 'http://localhost:9200/twitter/tweet/_search ' -d '{
"from" : 0, "size" : 10,
"query" : {
"term" : { "mail" : "user1@domain1.com " }
}
}
'
{"took":0,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}
--
dadoonet
(David Pilato)
October 31, 2012, 9:53am
2
Change your mapping for this field as you are using the default analyzer which split your email address in many tokens.
Or use a match Query instead of Term Query. Term is not analyzed. Match is.
HTH
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 31 oct. 2012 à 10:48, Zhen Wu wuzhen0808@gmail.com a écrit :
curl -XPOST 'http://localhost:9200/twitter/tweet' -d '{
"user" : "user1",
"mail" : "user1@domain1.com"
}
'
curl -XGET 'http://localhost:9200/twitter/tweet/_search ' -d '{
"from" : 0, "size" : 10,
"query" : {
"term" : { "mail" : "user1@domain1.com " }
}
}
'
{"took":0,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}
--
--
You can try to either make the mail field to be not analyzed at all,
or perhaps use the uax_url_email tokenizer
Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.
On Wed, Oct 31, 2012 at 3:18 PM, Zhen Wu wuzhen0808@gmail.com wrote:
curl -XPOST 'http://localhost:9200/twitter/tweet' -d '{
"user" : "user1",
"mail" : "user1@domain1.com"
}
'
curl -XGET 'http://localhost:9200/twitter/tweet/_search ' -d '{
"from" : 0, "size" : 10,
"query" : {
"term" : { "mail" : "user1@domain1.com " }
}
}
'
{"took":0,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}
--
--
Zhen_Wu
(Zhen Wu)
October 31, 2012, 3:13pm
4
Does it possible to make all the field not analyzed without declaration for
each one?
Such as in the index level to do this setting.
--
Igor_Motov
(Igor Motov)
October 31, 2012, 9:36pm
5
Yes, you can define an analyzer with name "default" and type "keyword", or
use dynamic templates (preferable).
On Wednesday, October 31, 2012 11:13:34 AM UTC-4, Zhen Wu wrote:
Does it possible to make all the field not analyzed without declaration
for each one?
Such as in the index level to do this setting.
--