# Storing only pointer to source field?

**URL:** <https://discuss.elastic.co/t/storing-only-pointer-to-source-field/326368>\
**Category:** Elasticsearch\
**Created:** [February 23, 2023, 7:30pm UTC](https://discuss.elastic.co/t/storing-only-pointer-to-source-field/326368 "2023-02-23T19:30:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![XD\_Captain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xd_captain/32/117676_2.png) [@XD\_Captain](https://discuss.elastic.co/u/XD_Captain)\
**Post date:** [February 23, 2023, 7:30pm UTC](https://discuss.elastic.co/t/storing-only-pointer-to-source-field/326368/1 "2023-02-23T19:30:39Z")

</div>

Hi,  
I'm new to Elasticsearch and am wondering about this: is there a handy way to not store the \_source field (original json file), but instead store just a pointer (ID) to the source field items?

For instance if the \_source field is very large, I'd like to only use it only for the original indexing, but not store it, and later when doing a search return the pointer to the matching items, so that I can still retrieve the original source items.

Can I set \_source to be 'disabled' but in the meantime store certain fields?

Thank you very much!!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 23, 2023, 9:16pm UTC](https://discuss.elastic.co/t/storing-only-pointer-to-source-field/326368/2 "2023-02-23T21:16:04Z")

</div>

Welcome to our community! 😃

Take a look at [synthetic `_source`](https://www.elastic.co/guide/en/elasticsearch/reference/8.6/mapping-source-field.html#synthetic-source), it might be what you want (but it has limits).

---

<div class="post-metadata">

**Author:** ![XD\_Captain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xd_captain/32/117676_2.png) [@XD\_Captain](https://discuss.elastic.co/u/XD_Captain)\
**Post date:** [February 24, 2023, 12:14am UTC](https://discuss.elastic.co/t/storing-only-pointer-to-source-field/326368/3 "2023-02-24T00:14:39Z")

</div>

> [@warkolm](#):
>
> synthetic `_source`

Thank you so much Mark! I did see this 'synthetic\_source' function before.

I'm actually wondering about: (1) what's actually lost if I set '\_source' to be 'disabled'? (2) would you suggest some way to store my data in some databse while still being able to search and retrieve using elasticsearch?

Really appreciate it!!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 24, 2023, 12:21am UTC](https://discuss.elastic.co/t/storing-only-pointer-to-source-field/326368/4 "2023-02-24T00:21:19Z")

</div>

> [@XD\_Captain](#):
>
> what's actually lost if I set '\_source' to be 'disabled'?

Per that docs page I linked, it's anything that isn't listed under the section "_Synthetic \_source can be used with indices that contain only these field types:_". So there's a [few field types](https://www.elastic.co/guide/en/elasticsearch/reference/8.6/mapping-types.html) that aren't there, but they may not be relevant to your use case anyway.

> [@XD\_Captain](#):
>
> would you suggest some way to store my data in some databse while still being able to search and retrieve using elasticsearch?

You can store a reference to another system in Elasticsearch but you'd need to handle the connection between the reference and the external system yourself.

---

<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:** [March 24, 2023, 12:22am UTC](https://discuss.elastic.co/t/storing-only-pointer-to-source-field/326368/5 "2023-03-24T00:22:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
