How to avoid MapperParsingException?


I'm indexing documents with the following structure:

{ "name": "peter", "email": "", "location": "MIA" }
{ "name": "mary", "email": "", "device": "ipad" }
{ "name": "mary", "email": "", "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"

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
To view this discussion on the web visit
For more options, visit