Dynamic Document Mapping Design Help

Hi everybody!

I'm trying to define the the best mapping for my documents. Documents
represents surveys's response and looks like the following example:

And my actual mapping looks like:

survey_id: "someuid",

answers: [
{question_id: 'theID', term: 'yes'}
{question_id: 'anyID', text: 'another response'}
and so on ...
]

And my mapping looks like:

answer: {

properties: {
survey_id: {type: 'string'}
answers: {
type: "nested",
term: {type: "string", index: "not_analyzed"},
text: {type: "string"},

  range: {type: "double"},

  question_id: {type: "string", index: "not_analyzed"}
}

}
}

Do you think that this is a correct mapping ?
As each answer can have different value type (long texts -> text type,
words -> term type, booleans, numbers, etc), is there any other mapping
design I should use.

Thank you very much!

--
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.