How to avoid MapperParsingException?

Hi,

I'm indexing documents with the following structure:

{ "name": "peter", "email": "p@p.com", "location": "MIA" }
{ "name": "mary", "email": "m@m.com", "device": "ipad" }
{ "name": "mary", "email": "m@m.com", "metadata": { ... } }

As you can see, I only know the type for "name" and "email" fields. The
location, device, metadata or whatever other field are dynamic fields.

So, in order to avoid a MapperParsingException, I want to persist all of
the document fields, but ONLY mark as "searchable" the "name" and "email"
fields.

Can I do that using mappings?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8bbe52be-59b4-4e78-8866-13716b3f862c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.