# Update \_source excludes in place in documents

**URL:** <https://discuss.elastic.co/t/update--source-excludes-in-place-in-documents/11152>\
**Category:** Elasticsearch\
**Created:** [March 14, 2013, 9:47am UTC](https://discuss.elastic.co/t/update--source-excludes-in-place-in-documents/11152 "2013-03-14T09:47:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaare\_Skovgaard](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kaare\_Skovgaard](https://discuss.elastic.co/u/Kaare_Skovgaard)\
**Post date:** [March 14, 2013, 9:47am UTC](https://discuss.elastic.co/t/update--source-excludes-in-place-in-documents/11152/1 "2013-03-14T09:47:28Z")

</div>

Hello,

After about a weeks running of indexing attachments into Elasticsearch, we  
sadly discovered that we forgot to add a \_source.excludes on the base64  
encoded file content of all the attachments.

We would love to somehow do the following:

1. Change the mapping to add the excludes to the source - I tried doing  
this using the regular PUT mapping API as described in the docs. However,  
it seems that when there is already a mapping in place, the source  
attribute is ignored? The same curl call I use works fine if I delete the  
type altogether first.
2. Use the update API on the actual documents to exclude that one field for  
all the documents that are already indexed. Reading the docs I can't seem  
to locate any information on how to try to achieve this.

Any help on this would be greatly appreciated! 🙂

And lastly: Thanks for an awesome product, it truly rocks! 🙂

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:46am UTC](https://discuss.elastic.co/t/update--source-excludes-in-place-in-documents/11152/2 "2017-07-06T02:46:32Z")

</div>


