I am not an Elasticsearch expert but I think that when indexing a document the 'path' field which contains the image url is being stored as a text field which means that Elasticsearch is internally tokenizing the url. As a consequence I'm not able to query an image url via a term query (it will return no results) to get an exact match. I am able to use a match query however this will also return other documents that have similar url's which is not optimal. Is there any way the 'path' field can be stored as a keyword field so that the urls do not get tokenized and term queries will work?
I am not an Elasticsearch expert but I think that when indexing a document the 'path' field which contains the image url is being stored as a text field which means that Elasticsearch is internally tokenizing the url. As a consequence I'm not able to query an image url via a term query (it will return no results) to get an exact match. I am able to use a match query however this will also return other documents that have similar url's which is not optimal. Is there any way the 'path' field can be stored as a keyword field so that the urls do not get tokenized and term queries will work?