Multi Core types mapping with a single field


(Asad Naqvi) #1

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"}
}
}
}
}
}

Is there any discussion already going on?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(Luca Cavanna) #2

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 :slight_smile:
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 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"}
}
}
}
}
}

Is there any discussion already going on?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #3