Greetings,
e are running into a scenario where we get json documents from a third
party website and consume it in our elastic search index for search
purpose. Consider the following mapping example and please excuse brevity
for simplicity:
{
"type1":{
"properties":{
"Value":{"type":"string"}
}
}
}
but now value field is returning string values some times and sometimes it
will return array of values.like:
{
"type1":{
"properties":{
"Value":{
"properties":{
"attrId":{"type":"long"},
"format Value":{"type":"string"}
}
}
}
}
}
If the question is whether you can have the same field appearing on the
index with different types at the same time (e.g. string or object), the
answer is no
The best solution would be to just use different names.
Hope this helps
Luca
On Tuesday, September 10, 2013 2:04:03 PM UTC+2, Asad Naqvi wrote:
Greetings,
e are running into a scenario where we get json documents from a third
party website and consume it in our Elasticsearch index for search
purpose. Consider the following mapping example and please excuse brevity
for simplicity:
{
"type1":{
"properties":{
"Value":{"type":"string"}
}
}
}
but now value field is returning string values some times and sometimes it
will return array of values.like:
{
"type1":{
"properties":{
"Value":{
"properties":{
"attrId":{"type":"long"},
"format Value":{"type":"string"}
}
}
}
}
}
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.