Hi Clinton
I have tried the below Gist query but i am getting the same problem
with not_analyzed mapping...
$ curl -XPUT 'http://localhost:9200/dbmail1/'
{"ok":true,"acknowledged":true}
$ curl -XPUT 'http://localhost:9200/dbmail1/metadata/_mapping' -d
'{"metadata" : {"dynamic" :"true","_source" :
{"enabled" :true },"properties" : {"fromfi
eld" : {"type" :"string","index" :"not_analyzed"}} } }'
{"ok":true,"acknowledged":true}
$ curl -XPUT 'http://localhost:9200/dbmail1/metadata/1' -d
'{"fromfield":"[zzzz@rediff.com,aaaa@hhh.com,llll@kkkk.com]"}'
{"ok":true,"_index":"dbmail1","_type":"metadata","_id":"4","_version":
1}
$ curl -XPUT 'http://localhost:9200/dbmail1/metadata/2' -d
'{"fromfield":"zzzz@rediff.com,aaaa@hhh.com,llll@kkkk.com"}'
{"ok":true,"_index":"dbmail1","_type":"metadata","_id":"5","_version":
1}
$ curl -XGET 'http://localhost:9200/dbmail1/metadata/_search' -d
'{ "query" : { "match_all" : { } }, "from" : 0, "size" : 0, "facets" :
{"tagfromfield" : {
"terms" : { "field" :"fromfield" ,"regex" :".*" ,"regex_flags" :
"DOTALL","size" : 1000 } } , "global" : false },"explain" : false }'
{"took":0,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":5,"max_score":1.0,"hits":},"facets":
{"tagfromfield":{"_type":"term
s","missing":0,"terms":
[{"term":"zzzz@rediff.com,aaaa@hhh.com,llll@kkkk.com","count":1},
{"term":"[zzzz@rediff.com,aaaa@hhh.com,llll@kkkk.com]","count":1}]}}}
I need the result like...
{"took":0,"timed_out":false,"_shards":{"total":5,"successful":
5,"failed":0},"hits":{"total":5,"max_score":1.0,"hits":},"facets":
{"tagfromfield":{"_type":"term
s","missing":0,"terms":[{"term":"zzzz@rediff.com","count":2},
{"term":"aaaa@hhh.com","count":2},{"term":"llll@kkkk.com","count":
2}]}}}
On Apr 27, 5:21 pm, Clinton Gormley clin...@iannounce.co.uk wrote:
Hi Senthil
I had inserted a value "x...@gmail.com,y...@yahoo.com,z...@rediff.com"
for a field named
"fromfield"
but in ES 16.0 version I am getting the result as
xxxx
gmail.com
yyyy
yahoo.com
zzzz
rediff.com
You will need to set the mapping for the fromfield to use
{"type": "string", "index": "not_analyzed"}
clint