ElasticSearch search for part of url
<p>I'm working with ElasticSearch 5 and can't find a solution for the following:
I want to search for a string with slashes (part of a url) in a document. But it won't return matching documents.
I've read something that strings with slashes are splitted by ES and that's not what I want for this field. I've tried to set "not_analyzed" on the field with a mapping, but I can't seem to get it to work somehow.</p>

<p>"Create index":
Put <a href="http://localhost:9200/test" rel="nofollow noreferrer">http://localhost:9200/test</a></p>

<pre><code>{
    "settings" : {
        "number_of_shards" : 1
    },
    "mappings" : {
        "type1" : {
            "properties" : {
                "field1" : { "type" : "text","index": "not_analyzed" }
            }
        }
    }
}
</code></pre>

<p>"Add document":POST <a href="http://localhost:9200/test/type1/" rel="nofollow noreferrer">http://localhost:9200/test/type1/</a></p>

<pre><code>{
    "field1" : "this/is/a/url/test"
}
</code></pre>

<p>"Search document" POST <a href="http://localhost:9200/test/type1/_search" rel="nofollow noreferrer">http://localhost:9200/test/type1/_search</a></p>

<pre><code>{
    "size" : 1000,
    "query" : {
        "bool" : {
            "must" : [{
                    "term" : {
                        "field1" : {
                            "value" : "this/is/a/url/test"
                        }
                    }
                }
            ]
        }
    }
}
</code></pre>

<p>Response:</p>

<pre><code>{
  "took": 1,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "failed": 0
  },
  "hits": {
    "total": 0,
    "max_score": null,
    "hits": []
  }
}
</code></pre>

<p>"The mapping response": GET <a href="http://localhost:9200/test/_mapping?pretty" rel="nofollow noreferrer">http://localhost:9200/test/_mapping?pretty</a></p>

<pre><code>{
  "test": {
    "mappings": {
      "type1": {
        "properties": {
          "field1": {
            "type": "text"
          }
        }
      }
    }
  }
}
</code></pre>