# Retrieve the complete document after search

**URL:** <https://discuss.elastic.co/t/retrieve-the-complete-document-after-search/285996>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [October 6, 2021, 8:57am UTC](https://discuss.elastic.co/t/retrieve-the-complete-document-after-search/285996 "2021-10-06T08:57:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_Tran](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@A\_Tran](https://discuss.elastic.co/u/A_Tran)\
**Post date:** [October 6, 2021, 8:57am UTC](https://discuss.elastic.co/t/retrieve-the-complete-document-after-search/285996/1 "2021-10-06T08:57:18Z")

</div>

Hi, with appsearch the result field has the limit of 1000 characters. But there is a way to open the complete document after that? Can I open then the whole document with seach-ui?

thanks

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [October 11, 2021, 2:55pm UTC](https://discuss.elastic.co/t/retrieve-the-complete-document-after-search/285996/2 "2021-10-11T14:55:38Z")

</div>

Results have "raw" and "snippet" values. You should be able to get the complete field values from the "raw" field: [Search API result fields | Elastic App Search Documentation [7.15] | Elastic](https://www.elastic.co/guide/en/app-search/current/result-fields-highlights.html)

---

<div class="post-metadata">

**Author:** ![A\_Tran](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@A\_Tran](https://discuss.elastic.co/u/A_Tran)\
**Post date:** [October 11, 2021, 3:09pm UTC](https://discuss.elastic.co/t/retrieve-the-complete-document-after-search/285996/3 "2021-10-11T15:09:59Z")

</div>

Thanks a lot 😉

---

<div class="post-metadata">

**Author:** ![A\_Tran](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@A\_Tran](https://discuss.elastic.co/u/A_Tran)\
**Post date:** [October 11, 2021, 10:10pm UTC](https://discuss.elastic.co/t/retrieve-the-complete-document-after-search/285996/4 "2021-10-11T22:10:06Z")

</div>

@JasonStoltz ok, I could retrieve the raw, but if the document indexed has more than 1000 characters I couldn't read it completely as the limit for raw is also 1000 characters as the snippet.

> **[Limits | Elastic App Search Documentation \[7.15\] | Elastic](https://www.elastic.co/guide/en/app-search/current/limits.html)**

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [October 12, 2021, 1:15pm UTC](https://discuss.elastic.co/t/retrieve-the-complete-document-after-search/285996/5 "2021-10-12T13:15:07Z")

</div>

Ah, I didn't realize that. I apologize for the misinformation 😬

That appears to be a hard limit as well. You could probably fetch the entire document with the Documents API: [Documents API | Elastic App Search Documentation [7.15] | Elastic](https://www.elastic.co/guide/en/app-search/current/documents.html#documents-get).

Just be aware that that API is only accessible with a "private" API key which you would not want to expose in plain text.

---

<div class="post-metadata">

**Author:** ![A\_Tran](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@A\_Tran](https://discuss.elastic.co/u/A_Tran)\
**Post date:** [October 12, 2021, 6:46pm UTC](https://discuss.elastic.co/t/retrieve-the-complete-document-after-search/285996/6 "2021-10-12T18:46:24Z")

</div>

Thanks Jason. So the way to see the complete document after search (document of more than a thousand characters) would be through a backend that handles that private key in a way that is not exposed?

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [October 13, 2021, 1:03pm UTC](https://discuss.elastic.co/t/retrieve-the-complete-document-after-search/285996/7 "2021-10-13T13:03:47Z")

</div>

I think so, yes.

You could also consider breaking that field up into multiple different fields before indexing and concatenate them back together when rendering results?

---

<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:** [November 10, 2021, 1:03pm UTC](https://discuss.elastic.co/t/retrieve-the-complete-document-after-search/285996/8 "2021-11-10T13:03:54Z")

</div>

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