# How the Elastic search results shows the cloudfront / CDN links contained in the body of a content

**URL:** <https://discuss.elastic.co/t/how-the-elastic-search-results-shows-the-cloudfront-cdn-links-contained-in-the-body-of-a-content/162153>\
**Category:** Elasticsearch\
**Created:** [December 26, 2018, 2:27pm UTC](https://discuss.elastic.co/t/how-the-elastic-search-results-shows-the-cloudfront-cdn-links-contained-in-the-body-of-a-content/162153 "2018-12-26T14:27:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![venu.pgi](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@venu.pgi](https://discuss.elastic.co/u/venu.pgi)\
**Post date:** [December 26, 2018, 2:27pm UTC](https://discuss.elastic.co/t/how-the-elastic-search-results-shows-the-cloudfront-cdn-links-contained-in-the-body-of-a-content/162153/1 "2018-12-26T14:27:44Z")

</div>

Hi Good morning all. I am new to elasticsearch looking for some help please. I have a webhook from "Contentful" cms connecting to an endpoint within [cloud.elastic.co](http://cloud.elastic.co) . Assume that I create a content which contains a media file , then within contentful it gets stored in a CDN, like below url: [//videos.ctfassets.net/jfanvmv5j7kj/1HFUYLr95K2Q2sQkc8uUiY/67396d50863d6deb7e761764fca066dc/Aquaman\_-\_Official\_Trailer\_1.mp4](https://videos.ctfassets.net/jfanvmv5j7kj/1HFUYLr95K2Q2sQkc8uUiY/67396d50863d6deb7e761764fca066dc/Aquaman_-_Official_Trailer_1.mp4))

However when I execute the elastic search in the results from within elastic search for links...it shows just the LINK IDs: instead of Cloudfront or CDN links shown above.

* * *

"fields": {  
"caption": {  
"en-US": "Aquaman is a 2018 American superhero film based on the DC Comics character of the same name, distributed by Warner Bros. Pictures. It is the sixth installment in the DC Extended Universe (DCEU). Directed by James Wan, with a screenplay by David Leslie "  
},  
"watchnowSlider": {  
"en-US": [  
{  
"sys": {  
"linkType": "Asset",  
"type": "Link",  
"id": "1USQ2qK5xiEQkoSa6IsYEo"  
}  
},  
{  
"sys": {  
"linkType": "Asset",  
"type": "Link",  
"id": "780dWpitFu8myUaQqyaymi"  
}  
}  
]  
},  
"video": {  
"en-US": {  
"sys": {  
"linkType": "Asset",  
"type": "Link",  
"id": "6pTzHDe1gcswGay2eM20G8"  
}  
}  
},

* * *

We are yet to build the front end , but we need to know how these links shows up in the front end when the user searches using elastic search from a website or an app. Kindly let me know any ideas how the elastic search actually displays the links from CDN or Cloudfront. Please point me some links for any example code to show the search results from front end as well. Thanks very much in advance. Have a great day

---

<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:** [December 26, 2018, 9:28pm UTC](https://discuss.elastic.co/t/how-the-elastic-search-results-shows-the-cloudfront-cdn-links-contained-in-the-body-of-a-content/162153/2 "2018-12-26T21:28:40Z")

</div>

Elasticsearch has no concept of links by default.  
What's ingesting the data and sending it to Elasticsearch? What is the mapping you are using?

---

<div class="post-metadata">

**Author:** ![venu.pgi](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@venu.pgi](https://discuss.elastic.co/u/venu.pgi)\
**Post date:** [December 27, 2018, 6:38am UTC](https://discuss.elastic.co/t/how-the-elastic-search-results-shows-the-cloudfront-cdn-links-contained-in-the-body-of-a-content/162153/3 "2018-12-27T06:38:47Z")

</div>

Hi Mark,  
Thanks for your response. ![Contentful-webhoook-to-elasticsearch](https://us1.discourse-cdn.com/elastic/original/3X/9/7/978e1e387b528c566909640f2e067da6cd2575fb.png) We are using Contentful to create content. I am attaching the image which contains how the contentful is sending the data to Elastic thru endpoint.

The content itself is having links to the cloudfront managed by Contentful e.g.

[//videos.ctfassets.net/jfanvmv5j7kj/1HFUYLr95K2Q2sQkc8uUiY/67396d50863d6deb7e761764fca066dc/Aquaman\_-\_Official\_Trailer\_1.mp4](https://videos.ctfassets.net/jfanvmv5j7kj/1HFUYLr95K2Q2sQkc8uUiY/67396d50863d6deb7e761764fca066dc/Aquaman_-_Official_Trailer_1.mp4))

But when it gets to Elastic cloud, it is sending the links as ID's "video": {  
"en-US": {  
"sys": {  
"linkType": "Asset",  
**"type": "Link",**  
**"id": "6pTzHDe1gcswGay2eM20G8"**

But my question is when the actual user searches from the website, how does the elastic shows the search results...in what form these IDs will be displayed? Ideally they must be shown as the real links (([https://videos.ctfassets.net/jfanvmv5j7kj/1HFUYLr95K2Q2sQkc8uUiY/67396d50863d6deb7e761764fca066dc/Aquaman\_-\_Official\_Trailer\_1.mp4](https://videos.ctfassets.net/jfanvmv5j7kj/1HFUYLr95K2Q2sQkc8uUiY/67396d50863d6deb7e761764fca066dc/Aquaman_-_Official_Trailer_1.mp4))) or a pointer to it...

Could you please suggest how to achieve this please

---

<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:** [December 27, 2018, 7:25am UTC](https://discuss.elastic.co/t/how-the-elastic-search-results-shows-the-cloudfront-cdn-links-contained-in-the-body-of-a-content/162153/4 "2018-12-27T07:25:39Z")

</div>

> [@venu.pgi](#):
>
> But when it gets to Elastic cloud

Elasticsearch can't change that, so it must be what the Contentful app is sending to it.

> [@venu.pgi](#):
>
> in what form these IDs will be displayed

Exactly like you showed in the image.

> [@venu.pgi](#):
>
> Could you please suggest how to achieve this please

Can you get the app to send the entire thing to Elasticsearch?

---

<div class="post-metadata">

**Author:** ![venu.pgi](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@venu.pgi](https://discuss.elastic.co/u/venu.pgi)\
**Post date:** [December 27, 2018, 8:25am UTC](https://discuss.elastic.co/t/how-the-elastic-search-results-shows-the-cloudfront-cdn-links-contained-in-the-body-of-a-content/162153/5 "2018-12-27T08:25:16Z")

</div>

Hi Mark, Thanks for your response. I tried sending the data which contains a CDN url of image and it is sending perfectly to the elastic as shown below

},  
"description": {  
"en-US": "

 ![chutneyrs](https://images.ctfassets.net/5yalg1fyk63m/4yYk1hBgCkAkg24WY2aeOi/5acfa3ef1b42d870540e45be7e7b5b71/chutneyrs.JPG)"  
},

as you rightly suggested, I need to figure out how to send video fields contents also from Contentful app as a link instead of ID,

---

<div class="post-metadata">

**Author:** ![venu.pgi](https://avatars.discourse-cdn.com/v4/letter/v/3e96dc/32.png) [@venu.pgi](https://discuss.elastic.co/u/venu.pgi)\
**Post date:** [December 27, 2018, 8:29am UTC](https://discuss.elastic.co/t/how-the-elastic-search-results-shows-the-cloudfront-cdn-links-contained-in-the-body-of-a-content/162153/6 "2018-12-27T08:29:00Z")

</div>

I just noticed , when I pasted the link... it is automatically getting the chutney's image from CDN and embedding in this chat as well..🙂

"[//images.ctfassets.net/5yalg1fyk63m/4yYk1hBgCkAkg24WY2aeOi/5acfa3ef1b42d870540e45be7e7b5b71/chutneyrs.JPG](https://images.ctfassets.net/5yalg1fyk63m/4yYk1hBgCkAkg24WY2aeOi/5acfa3ef1b42d870540e45be7e7b5b71/chutneyrs.JPG)"

---

<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:** [January 24, 2019, 8:29am UTC](https://discuss.elastic.co/t/how-the-elastic-search-results-shows-the-cloudfront-cdn-links-contained-in-the-body-of-a-content/162153/7 "2019-01-24T08:29:06Z")

</div>

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