Elastic search aggregations buckets counting email format as two different bucket key

I have field stored as "user1@user.com " .

Using aggregations json query :

"aggregations": {
"email-terms": {
"terms": {
"field": "l_obj.email",
"size": 0,
"shard_size": 0,
"order": {
"_count": "desc"
}
}
}
}

I am getting response :

"buckets" : [
{
"key" : "user.com",
"doc_count" : 1
},
{
"key" : "user1",
"doc_count" : 1
}

instead of

"buckets" : [
{
"key" : "user1@user.com",
"doc_count" : 1
}
]

Same issue persists for string type likes : user1.user2.user.com ,I am
doing terms aggregations . Am i missing something here ?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c70c288c-f8f2-4239-a8e9-55640c6945e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

There is a bucket for each indexed term for the selected field, not for
each stored value.

Whatever tokenizer you are using on that field is dividing the text at the
"@" symbol.

If you want buckets for the exact value of the field, you need a
not_analyzed field.

On Wednesday, April 15, 2015 at 8:15:52 PM UTC-4, Rajesh Sindhu wrote:

I have field stored as "us...@user.com <javascript:> " .

Using aggregations json query :

"aggregations": {
"email-terms": {
"terms": {
"field": "l_obj.email",
"size": 0,
"shard_size": 0,
"order": {
"_count": "desc"
}
}
}
}

I am getting response :

"buckets" : [
{
"key" : "user.com",
"doc_count" : 1
},
{
"key" : "user1",
"doc_count" : 1
}

instead of

"buckets" : [
{
"key" : "us...@user.com <javascript:>",
"doc_count" : 1
}
]

Same issue persists for string type likes : user1.user2.user.com ,I am
doing terms aggregations . Am i missing something here ?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4c3535f6-7fa0-4388-8a81-4ddd26015e92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.