# Editing or Prettifying the Source

**URL:** <https://discuss.elastic.co/t/editing-or-prettifying-the-source/3378>\
**Category:** Elasticsearch\
**Created:** [September 28, 2010, 2:32pm UTC](https://discuss.elastic.co/t/editing-or-prettifying-the-source/3378 "2010-09-28T14:32:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ted\_Karmel](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@Ted\_Karmel](https://discuss.elastic.co/u/Ted_Karmel)\
**Post date:** [September 28, 2010, 2:32pm UTC](https://discuss.elastic.co/t/editing-or-prettifying-the-source/3378/1 "2010-09-28T14:32:02Z")

</div>

Hi Elasticsearchers,

It is great to be able to just get the source of a document directly  
with field scripts. I was just wondering if it was possible to edit  
the source itself. This is particularly useful if you are giving the  
client direct access to the raw json. You may want to omit the id key  
of the document or some other security sensitive information. You may  
want to rename some of the keys to a more user-friendly name. Is it  
possible to include parameters to achieve this effect?

Of course, this does not have to be done on the elasticsearch side.  
But, it would be really neat if there was this possibility or if the  
feature was implemented in a future version.

Cheers,  
Ted

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [September 28, 2010, 5:38pm UTC](https://discuss.elastic.co/t/editing-or-prettifying-the-source/3378/2 "2010-09-28T17:38:01Z")

</div>

There isn't a way to do it. The main problem here is how is the user going  
to define how the json looks like. I have some ideas, but it will happen  
later in the lifecycle of elasticsearch.

On Tue, Sep 28, 2010 at 4:32 PM, Ted Karmel [ted.karmel@gmail.com](mailto:ted.karmel@gmail.com) wrote:

> Hi Elasticsearchers,
> 
> It is great to be able to just get the source of a document directly  
> with field scripts. I was just wondering if it was possible to edit  
> the source itself. This is particularly useful if you are giving the  
> client direct access to the raw json. You may want to omit the id key  
> of the document or some other security sensitive information. You may  
> want to rename some of the keys to a more user-friendly name. Is it  
> possible to include parameters to achieve this effect?
> 
> Of course, this does not have to be done on the elasticsearch side.  
> But, it would be really neat if there was this possibility or if the  
> feature was implemented in a future version.
> 
> Cheers,  
> Ted

---

<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, 4:18am UTC](https://discuss.elastic.co/t/editing-or-prettifying-the-source/3378/3 "2017-07-06T04:18:48Z")

</div>


