# Searching for a URL

**URL:** <https://discuss.elastic.co/t/searching-for-a-url/144519>\
**Category:** Elasticsearch\
**Created:** [August 15, 2018, 12:49pm UTC](https://discuss.elastic.co/t/searching-for-a-url/144519 "2018-08-15T12:49:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dasith2190](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dasith2190](https://discuss.elastic.co/u/dasith2190)\
**Post date:** [August 15, 2018, 12:49pm UTC](https://discuss.elastic.co/t/searching-for-a-url/144519/1 "2018-08-15T12:49:28Z")

</div>

Hi,

I am trying to search for a URL using elastic search, but when I add http:// to the URL it doesn't work. I am using `UAX_URL_Email_Tokenizer` as the token. I tried with the lowercase token as well, without any luck. How could I fix it?

```
{
  "mappings" : {
      "service" : {
          "properties" : {
              "title": { "type": "text", "fields": {"raw": {"type": "keyword"}}},
              "linked_items": {
                  "properties" : {
                      "name": {"type": "text", "fields": {"raw": {"type": "keyword"}}},
                      "additional_data": {"type": "text", "analyzer": "url_analyzer", "fields": {"raw": {"type": "keyword"}}}
                  }
              }
          }
      }
  },
  "settings" : {
      "analysis": {
        "filter" : {
          "stopwords_filter" : {
            "type" : "stop",
            "stopwords" : ["http", "https", "www"]
          }
        },
        "analyzer": {
          "url_analyzer": {
            "type": "custom",
            "tokenizer": "uax_url_email",
            "filter": ["stopwords_filter", "lowercase"]
          }
        }
      }
    }
}

```

The search query is:

```
{
     "query": {
         "query_string": {
             "query": "*https://text.com*",
             "fields": ["title", "linked_items.additional_data"],
                          "default_operator": "AND"
         }
     },
     "size": 300
 }
```

---

<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:** [September 12, 2018, 12:49pm UTC](https://discuss.elastic.co/t/searching-for-a-url/144519/2 "2018-09-12T12:49:43Z")

</div>

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