# Query text in HTML markup

**URL:** <https://discuss.elastic.co/t/query-text-in-html-markup/167650>\
**Category:** Elasticsearch\
**Created:** [February 8, 2019, 2:59pm UTC](https://discuss.elastic.co/t/query-text-in-html-markup/167650 "2019-02-08T14:59:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbratschi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbratschi/32/40729_2.png) [@cbratschi](https://discuss.elastic.co/u/cbratschi)\
**Post date:** [February 8, 2019, 2:59pm UTC](https://discuss.elastic.co/t/query-text-in-html-markup/167650/1 "2019-02-08T14:59:07Z")

</div>

We have a strange problem: we are searching for URL patterns in our text data (type is keyword). This works fine whenever the URL is isolated but it fails if the same URL is part of an iframe.

1. query

Simplified query just searching for a part of the URL.

"wildcard:": {  
"post\_content": "59987"  
}

1. URL patterns

a) 59987

This pattern in a text works fine.

b) [https://video.xyz.ch/content/xyz/xyz/59987/index.html](https://video.xyz.ch/content/xyz/xyz/59987/index.html)

This one too.

c) src="[https://video.xyz.ch/content/xyz/xyz/59987/index.html](https://video.xyz.ch/content/xyz/xyz/59987/index.html)"

Still works.

d) \<src="[https://video.xyz.ch/content/xyz/xyz/59987/index.html](https://video.xyz.ch/content/xyz/xyz/59987/index.html)"\>

Now it suddenly fails. Even if we add wildcards, such as _59987_, there are empty results.

What are we doing wrong?

---

<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 8, 2019, 2:59pm UTC](https://discuss.elastic.co/t/query-text-in-html-markup/167650/2 "2019-03-08T14:59:10Z")

</div>

Closed on March 8, 2019, 2:59pm UTC

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