I am trying to get the fielddata from a not_analyzed
field in Multi Get query. It is working fine in _search
queries.
This is what I've tried with no luck:
curl -XGET "http://es:9200/articles/article/_mget/?pretty&fielddata_fields=url" -d '{"ids" : ["5763197951"]}'
curl -XGET "http://es:9200/articles/article/_mget/?pretty" -d '{"fielddata_fields": ["url"], "ids" : ["5763197951"]}'
curl -XGET "http://es:9200/articles/article/_mget/?pretty" -d '{"docs" : [{"_id" : "5763197951", "fielddata_fields": ["url"]}]}'
It looks like fielddata_fields
is completely ignored, since I always get this result:
{
"docs" : [ {
"_index" : "articles",
"_type" : "article",
"_id" : "5763197951",
"_version" : 1,
"found" : true
} ]
}
I'm running ES version 1.4.4
with JVM: 1.8.0_31
Edit: I just tried the above with a test database running ES 2.2.2
with the same results...
My index mapping is the following:
{
"articles":{
"mappings":{
"article":{
"_all":{
"enabled":false
},
"_source":{
"enabled":false
},
"properties":{
"content":{
"type":"string",
"norms":{
"enabled":false
}
},
"url":{
"type":"string",
"index":"not_analyzed"
}
}
}
},
"settings":{
"index":{
"refresh_interval":"30s",
"number_of_shards":"20",
"analysis":{
"analyzer":{
"default":{
"filter":[
"icu_folding",
"icu_normalizer"
],
"type":"custom",
"tokenizer":"icu_tokenizer"
}
}
},
"number_of_replicas":"1"
}
}
}
}