# Filter on not\_analyzed field with whitespace/hyphen not working

**URL:** <https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662>\
**Category:** Elasticsearch\
**Created:** [August 7, 2012, 11:14pm UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662 "2012-08-07T23:14:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![bashir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bashir/32/2780_2.png) [@bashir](https://discuss.elastic.co/u/bashir)\
**Post date:** [August 7, 2012, 11:14pm UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/1 "2012-08-07T23:14:58Z")

</div>

I've been scratching my head for some time on this one. Major brownie  
points for any guidance:  
I have mapping:  
mapping :show =\> { :properties =\> {...  
:tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index  
=\> 'not\_analyzed'},  
...}}

tags is an array of tags. For example:  
"tags":["rails","ruby on rails"]

I run a query as such(notice no results):

curl -X GET "  
[http://localhost:9200/magic/\_search?from=0&page=1&per\_page=24&size=24pretty=true](http://localhost:9200/magic/_search?from=0&page=1&per_page=24&size=24pretty=true)"  
-d '{"sort":[[{"score":"desc"}]],"filter":{"terms":{"tags":["ruby on  
rails"]}},"size":24,"from":0}'  
{  
"took" : 0,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 0,  
"max\_score" : null,  
"hits" : []  
}

If I run it with "tags":["ruby"], it will match all documents that are  
tagged "ruby" and all documents tagged "ruby on rails". I don't want a  
substring search, I need an exact search and I thought if the field is  
"not\_analyzed" that it would be an exact match. How to do this the right  
way. Notice that this is a filter and not query.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 8, 2012, 12:55am UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/2 "2012-08-08T00:55:00Z")

</div>

Are you sure that your mapping is applied?  
What do you see when doing:  
curl -XGET '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)'  
also, did you try with Term filter instead of terms filter? Same result I suppose.

## David

Le 8 août 2012 à 01:14, Bashir Eghbali [bashir@gmail.com](mailto:bashir@gmail.com) a écrit :

> I've been scratching my head for some time on this one. Major brownie points for any guidance:  
> I have mapping:  
> mapping :show =\> { :properties =\> {...  
> :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index =\> 'not\_analyzed'},  
> ...}}
> 
> tags is an array of tags. For example:  
> "tags":["rails","ruby on rails"]
> 
> I run a query as such(notice no results):
> 
> curl -X GET "[http://localhost:9200/magic/\_search?from=0&page=1&per\_page=24&size=24pretty=true](http://localhost:9200/magic/_search?from=0&page=1&per_page=24&size=24pretty=true)" -d '{"sort":[[{"score":"desc"}]],"filter":{"terms":{"tags":["ruby on rails"]}},"size":24,"from":0}'  
> {  
> "took" : 0,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 5,  
> "successful" : 5,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 0,  
> "max\_score" : null,  
> "hits" :   
> }
> 
> If I run it with "tags":["ruby"], it will match all documents that are tagged "ruby" and all documents tagged "ruby on rails". I don't want a substring search, I need an exact search and I thought if the field is "not\_analyzed" that it would be an exact match. How to do this the right way. Notice that this is a filter and not query.

---

<div class="post-metadata">

**Author:** ![bashir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bashir/32/2780_2.png) [@bashir](https://discuss.elastic.co/u/bashir)\
**Post date:** [August 8, 2012, 2:07am UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/3 "2012-08-08T02:07:12Z")

</div>

I get:  
"tags":{"type":"string"}

It says type string but when I assign to tags at indexing time, I pass in  
an array of strings. I assume it handles the json array fine.

I tried term filter as well to no avail.

Any other ideas? does the terms query get tokenized at query time and then  
matched against a verbatim indexed field, resulting in prefix match?

On Tuesday, August 7, 2012 5:55:00 PM UTC-7, David Pilato wrote:

> Are you sure that your mapping is applied?  
> What do you see when doing:
> 
> curl -XGET '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)'
> 
> also, did you try with Term filter instead of terms filter? Same result I  
> suppose.
> 
> ## David
> 
> Le 8 août 2012 à 01:14, Bashir Eghbali \<[bas...@gmail.com](mailto:bas...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> I've been scratching my head for some time on this one. Major brownie  
> points for any guidance:  
> I have mapping:  
> mapping :show =\> { :properties =\> {...  
> :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index  
> =\> 'not\_analyzed'},  
> ...}}
> 
> tags is an array of tags. For example:  
> "tags":["rails","ruby on rails"]
> 
> I run a query as such(notice no results):
> 
> curl -X GET "  
> [http://localhost:9200/magic/\_search?from=0&page=1&per\_page=24&size=24pretty=true](http://localhost:9200/magic/_search?from=0&page=1&per_page=24&size=24pretty=true)"  
> -d '{"sort":[[{"score":"desc"}]],"filter":{"terms":{"tags":["ruby on  
> rails"]}},"size":24,"from":0}'  
> {  
> "took" : 0,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 5,  
> "successful" : 5,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 0,  
> "max\_score" : null,  
> "hits" :   
> }
> 
> If I run it with "tags":["ruby"], it will match all documents that are  
> tagged "ruby" and all documents tagged "ruby on rails". I don't want a  
> substring search, I need an exact search and I thought if the field is  
> "not\_analyzed" that it would be an exact match. How to do this the right  
> way. Notice that this is a filter and not query.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 8, 2012, 7:03am UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/4 "2012-08-08T07:03:58Z")

</div>

So, you can see that your mapping is not applied.  
Remove your index magic and create it again.  
Send the mapping  
Verify that your mapping is correct  
And only if correct, send your document and run your query again. It should work.

HTH  
David

--

Le 8 août 2012 à 04:07, Bashir Eghbali [bashir@gmail.com](mailto:bashir@gmail.com) a écrit :

> I get:  
> "tags":{"type":"string"}
> 
> It says type string but when I assign to tags at indexing time, I pass in an array of strings. I assume it handles the json array fine.
> 
> I tried term filter as well to no avail.
> 
> Any other ideas? does the terms query get tokenized at query time and then matched against a verbatim indexed field, resulting in prefix match?
> 
> On Tuesday, August 7, 2012 5:55:00 PM UTC-7, David Pilato wrote:  
> Are you sure that your mapping is applied?  
> What do you see when doing:  
> curl -XGET '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)'  
> also, did you try with Term filter instead of terms filter? Same result I suppose.
> 
> ## David
> 
> Le 8 août 2012 à 01:14, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> 
> > I've been scratching my head for some time on this one. Major brownie points for any guidance:  
> > I have mapping:  
> > mapping :show =\> { :properties =\> {...  
> > :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index =\> 'not\_analyzed'},  
> > ...}}
> > 
> > tags is an array of tags. For example:  
> > "tags":["rails","ruby on rails"]
> > 
> > I run a query as such(notice no results):
> > 
> > curl -X GET "[http://localhost:9200/magic/\_search?from=0&page=1&per\_page=24&size=24pretty=true](http://localhost:9200/magic/_search?from=0&page=1&per_page=24&size=24pretty=true)" -d '{"sort":[[{"score":"desc"}]],"filter":{"terms":{"tags":["ruby on rails"]}},"size":24,"from":0}'  
> > {  
> > "took" : 0,  
> > "timed\_out" : false,  
> > "\_shards" : {  
> > "total" : 5,  
> > "successful" : 5,  
> > "failed" : 0  
> > },  
> > "hits" : {  
> > "total" : 0,  
> > "max\_score" : null,  
> > "hits" :   
> > }
> > 
> > If I run it with "tags":["ruby"], it will match all documents that are tagged "ruby" and all documents tagged "ruby on rails". I don't want a substring search, I need an exact search and I thought if the field is "not\_analyzed" that it would be an exact match. How to do this the right way. Notice that this is a filter and not query.

---

<div class="post-metadata">

**Author:** ![bashir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bashir/32/2780_2.png) [@bashir](https://discuss.elastic.co/u/bashir)\
**Post date:** [August 8, 2012, 8:01am UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/5 "2012-08-08T08:01:23Z")

</div>

If the mapping was not applied, I would venture that no search would work.  
Search works in general just returns superset of data or no data on tags  
with spaces.  
I am not sure what the mapping should look like for the type as there is no  
explicit array type in elasticsearch. should I be configuring the index  
with a different type/structure? it seems to show the type that was  
configured right now which is string.

thanks,  
Bashir

On Wed, Aug 8, 2012 at 12:03 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> So, you can see that your mapping is not applied.  
> Remove your index magic and create it again.  
> Send the mapping  
> Verify that your mapping is correct  
> And only if correct, send your document and run your query again. It  
> should work.
> 
> HTH  
> David
> 
> --
> 
> Le 8 août 2012 à 04:07, Bashir Eghbali [bashir@gmail.com](mailto:bashir@gmail.com) a écrit :
> 
> I get:  
> "tags":{"type":"string"}
> 
> It says type string but when I assign to tags at indexing time, I pass in  
> an array of strings. I assume it handles the json array fine.
> 
> I tried term filter as well to no avail.
> 
> Any other ideas? does the terms query get tokenized at query time and then  
> matched against a verbatim indexed field, resulting in prefix match?
> 
> On Tuesday, August 7, 2012 5:55:00 PM UTC-7, David Pilato wrote:
> 
> > Are you sure that your mapping is applied?  
> > What do you see when doing:
> > 
> > curl -XGET '[http://localhost:9200/magic/\*\*yourtype/\_mapping](http://localhost:9200/magic/**yourtype/_mapping)' [http://localhost:9200/magic/yourtype/\_mapping'](http://localhost:9200/magic/yourtype/_mapping')
> > 
> > also, did you try with Term filter instead of terms filter? Same result I  
> > suppose.
> > 
> > ## David
> > 
> > Le 8 août 2012 à 01:14, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > 
> > I've been scratching my head for some time on this one. Major brownie  
> > points for any guidance:  
> > I have mapping:  
> > mapping :show =\> { :properties =\> {...  
> > :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index  
> > =\> 'not\_analyzed'},  
> > ...}}
> > 
> > tags is an array of tags. For example:  
> > "tags":["rails","ruby on rails"]
> > 
> > I run a query as such(notice no results):
> > 
> > curl -X GET "[http://localhost:9200/magic/\_](http://localhost:9200/magic/_)\*\*  
> > search?from=0&page=1&per\_page=**24&size=24pretty=true[http://localhost:9200/magic/\_search?from=0&page=1&per\_page=24&size=24pretty=true](http://localhost:9200/magic/_search?from=0&page=1&per_page=24&size=24pretty=true)"  
> > -d '{"sort":[[{"score":"desc"}]],**"filter":{"terms":{"tags":["**ruby on  
> > rails"]}},"size":24,"from":0}'**  
> > {  
> > "took" : 0,  
> > "timed\_out" : false,  
> > "\_shards" : {  
> > "total" : 5,  
> > "successful" : 5,  
> > "failed" : 0  
> > },  
> > "hits" : {  
> > "total" : 0,  
> > "max\_score" : null,  
> > "hits" :   
> > }
> > 
> > If I run it with "tags":["ruby"], it will match all documents that are  
> > tagged "ruby" and all documents tagged "ruby on rails". I don't want a  
> > substring search, I need an exact search and I thought if the field is  
> > "not\_analyzed" that it would be an exact match. How to do this the right  
> > way. Notice that this is a filter and not query.

--  
Bashir Eghbali

[bashireghbali.com](http://bashireghbali.com)  
linkedin [http://www.linkedin.com/in/bashireghbali](http://www.linkedin.com/in/bashireghbali)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 8, 2012, 8:07am UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/6 "2012-08-08T08:07:36Z")

</div>

Array of string can be considered as a String type.

So create your mapping like this:

$ curl -XPUT '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)' -d '  
{  
"yourtype" : {  
"properties" : {  
"message" : {"type" : "string", "index" : "not\_analyzed"}  
}  
}  
}  
'

--

Le 8 août 2012 à 10:01, Bashir Eghbali [bashir@gmail.com](mailto:bashir@gmail.com) a écrit :

> If the mapping was not applied, I would venture that no search would work. Search works in general just returns superset of data or no data on tags with spaces.  
> I am not sure what the mapping should look like for the type as there is no explicit array type in elasticsearch. should I be configuring the index with a different type/structure? it seems to show the type that was configured right now which is string.
> 
> thanks,  
> Bashir
> 
> On Wed, Aug 8, 2012 at 12:03 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
> So, you can see that your mapping is not applied.  
> Remove your index magic and create it again.  
> Send the mapping  
> Verify that your mapping is correct  
> And only if correct, send your document and run your query again. It should work.
> 
> HTH  
> David
> 
> --
> 
> Le 8 août 2012 à 04:07, Bashir Eghbali [bashir@gmail.com](mailto:bashir@gmail.com) a écrit :
> 
> > I get:  
> > "tags":{"type":"string"}
> > 
> > It says type string but when I assign to tags at indexing time, I pass in an array of strings. I assume it handles the json array fine.
> > 
> > I tried term filter as well to no avail.
> > 
> > Any other ideas? does the terms query get tokenized at query time and then matched against a verbatim indexed field, resulting in prefix match?
> > 
> > On Tuesday, August 7, 2012 5:55:00 PM UTC-7, David Pilato wrote:  
> > Are you sure that your mapping is applied?  
> > What do you see when doing:  
> > curl -XGET '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)'  
> > also, did you try with Term filter instead of terms filter? Same result I suppose.
> > 
> > ## David
> > 
> > Le 8 août 2012 à 01:14, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > 
> > > I've been scratching my head for some time on this one. Major brownie points for any guidance:  
> > > I have mapping:  
> > > mapping :show =\> { :properties =\> {...  
> > > :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index =\> 'not\_analyzed'},  
> > > ...}}
> > > 
> > > tags is an array of tags. For example:  
> > > "tags":["rails","ruby on rails"]
> > > 
> > > I run a query as such(notice no results):
> > > 
> > > curl -X GET "[http://localhost:9200/magic/\_search?from=0&page=1&per\_page=24&size=24pretty=true](http://localhost:9200/magic/_search?from=0&page=1&per_page=24&size=24pretty=true)" -d '{"sort":[[{"score":"desc"}]],"filter":{"terms":{"tags":["ruby on rails"]}},"size":24,"from":0}'  
> > > {  
> > > "took" : 0,  
> > > "timed\_out" : false,  
> > > "\_shards" : {  
> > > "total" : 5,  
> > > "successful" : 5,  
> > > "failed" : 0  
> > > },  
> > > "hits" : {  
> > > "total" : 0,  
> > > "max\_score" : null,  
> > > "hits" :   
> > > }
> > > 
> > > If I run it with "tags":["ruby"], it will match all documents that are tagged "ruby" and all documents tagged "ruby on rails". I don't want a substring search, I need an exact search and I thought if the field is "not\_analyzed" that it would be an exact match. How to do this the right way. Notice that this is a filter and not query.
> 
> --  
> Bashir Eghbali
> 
> [bashireghbali.com](http://bashireghbali.com)  
> linkedin

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 8, 2012, 8:08am UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/7 "2012-08-08T08:08:25Z")

</div>

Sorry. Replace message by tags.

--

Le 8 août 2012 à 10:07, David Pilato [david@pilato.fr](mailto:david@pilato.fr) a écrit :

> Array of string can be considered as a String type.
> 
> So create your mapping like this:
> 
> $ curl -XPUT '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)' -d '  
> {  
> "yourtype" : {  
> "properties" : {  
> "message" : {"type" : "string", "index" : "not\_analyzed"}  
> }  
> }  
> }  
> '
> 
> --
> 
> Le 8 août 2012 à 10:01, Bashir Eghbali [bashir@gmail.com](mailto:bashir@gmail.com) a écrit :
> 
> > If the mapping was not applied, I would venture that no search would work. Search works in general just returns superset of data or no data on tags with spaces.  
> > I am not sure what the mapping should look like for the type as there is no explicit array type in elasticsearch. should I be configuring the index with a different type/structure? it seems to show the type that was configured right now which is string.
> > 
> > thanks,  
> > Bashir
> > 
> > On Wed, Aug 8, 2012 at 12:03 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
> > So, you can see that your mapping is not applied.  
> > Remove your index magic and create it again.  
> > Send the mapping  
> > Verify that your mapping is correct  
> > And only if correct, send your document and run your query again. It should work.
> > 
> > HTH  
> > David
> > 
> > --
> > 
> > Le 8 août 2012 à 04:07, Bashir Eghbali [bashir@gmail.com](mailto:bashir@gmail.com) a écrit :
> > 
> > > I get:  
> > > "tags":{"type":"string"}
> > > 
> > > It says type string but when I assign to tags at indexing time, I pass in an array of strings. I assume it handles the json array fine.
> > > 
> > > I tried term filter as well to no avail.
> > > 
> > > Any other ideas? does the terms query get tokenized at query time and then matched against a verbatim indexed field, resulting in prefix match?
> > > 
> > > On Tuesday, August 7, 2012 5:55:00 PM UTC-7, David Pilato wrote:  
> > > Are you sure that your mapping is applied?  
> > > What do you see when doing:  
> > > curl -XGET '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)'  
> > > also, did you try with Term filter instead of terms filter? Same result I suppose.
> > > 
> > > ## David
> > > 
> > > Le 8 août 2012 à 01:14, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > > 
> > > > I've been scratching my head for some time on this one. Major brownie points for any guidance:  
> > > > I have mapping:  
> > > > mapping :show =\> { :properties =\> {...  
> > > > :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index =\> 'not\_analyzed'},  
> > > > ...}}
> > > > 
> > > > tags is an array of tags. For example:  
> > > > "tags":["rails","ruby on rails"]
> > > > 
> > > > I run a query as such(notice no results):
> > > > 
> > > > curl -X GET "[http://localhost:9200/magic/\_search?from=0&page=1&per\_page=24&size=24pretty=true](http://localhost:9200/magic/_search?from=0&page=1&per_page=24&size=24pretty=true)" -d '{"sort":[[{"score":"desc"}]],"filter":{"terms":{"tags":["ruby on rails"]}},"size":24,"from":0}'  
> > > > {  
> > > > "took" : 0,  
> > > > "timed\_out" : false,  
> > > > "\_shards" : {  
> > > > "total" : 5,  
> > > > "successful" : 5,  
> > > > "failed" : 0  
> > > > },  
> > > > "hits" : {  
> > > > "total" : 0,  
> > > > "max\_score" : null,  
> > > > "hits" :   
> > > > }
> > > > 
> > > > If I run it with "tags":["ruby"], it will match all documents that are tagged "ruby" and all documents tagged "ruby on rails". I don't want a substring search, I need an exact search and I thought if the field is "not\_analyzed" that it would be an exact match. How to do this the right way. Notice that this is a filter and not query.
> > 
> > --  
> > Bashir Eghbali
> > 
> > [bashireghbali.com](http://bashireghbali.com)  
> > linkedin

---

<div class="post-metadata">

**Author:** ![bashir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bashir/32/2780_2.png) [@bashir](https://discuss.elastic.co/u/bashir)\
**Post date:** [August 8, 2012, 9:28pm UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/8 "2012-08-08T21:28:49Z")

</div>

that is how I've had my mapping, here is my mapping:  
:magic =\> { :properties =\> {  
:tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index  
=\> 'not\_analyzed'},  
}}

is this not correct or you are suggesting to get rid of :index\_name and  
:boost?

On Wednesday, August 8, 2012 1:08:25 AM UTC-7, David Pilato wrote:

> Sorry. Replace message by tags.
> 
> --
> 
> Le 8 août 2012 à 10:07, David Pilato \<[da...@pilato.fr](mailto:da...@pilato.fr) \<javascript:\>\> a  
> écrit :
> 
> Array of string can be considered as a String type.
> 
> So create your mapping like this:
> 
> $ curl -XPUT '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)' -d '  
> {  
> "yourtype" : {  
> "properties" : {  
> "message" : {"type" : "string", "index" : "not\_analyzed"}  
> }  
> }  
> }  
> '
> 
> --
> 
> Le 8 août 2012 à 10:01, Bashir Eghbali \<[bas...@gmail.com](mailto:bas...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> If the mapping was not applied, I would venture that no search would work.  
> Search works in general just returns superset of data or no data on tags  
> with spaces.  
> I am not sure what the mapping should look like for the type as there is  
> no explicit array type in elasticsearch. should I be configuring the index  
> with a different type/structure? it seems to show the type that was  
> configured right now which is string.
> 
> thanks,  
> Bashir
> 
> On Wed, Aug 8, 2012 at 12:03 AM, David Pilato \<[da...@pilato.fr](mailto:da...@pilato.fr)\<javascript:\>
> 
> > wrote:
> 
> > So, you can see that your mapping is not applied.  
> > Remove your index magic and create it again.  
> > Send the mapping  
> > Verify that your mapping is correct  
> > And only if correct, send your document and run your query again. It  
> > should work.
> > 
> > HTH  
> > David
> > 
> > --
> > 
> > Le 8 août 2012 à 04:07, Bashir Eghbali \<[bas...@gmail.com](mailto:bas...@gmail.com) \<javascript:\>\>  
> > a écrit :
> > 
> > I get:  
> > "tags":{"type":"string"}
> > 
> > It says type string but when I assign to tags at indexing time, I pass in  
> > an array of strings. I assume it handles the json array fine.
> > 
> > I tried term filter as well to no avail.
> > 
> > Any other ideas? does the terms query get tokenized at query time and  
> > then matched against a verbatim indexed field, resulting in prefix match?
> > 
> > On Tuesday, August 7, 2012 5:55:00 PM UTC-7, David Pilato wrote:
> > 
> > > Are you sure that your mapping is applied?  
> > > What do you see when doing:
> > > 
> > > curl -XGET '[http://localhost:9200/magic/\*\*yourtype/\_mapping](http://localhost:9200/magic/**yourtype/_mapping)' [http://localhost:9200/magic/yourtype/\_mapping'](http://localhost:9200/magic/yourtype/_mapping')
> > > 
> > > also, did you try with Term filter instead of terms filter? Same result  
> > > I suppose.
> > > 
> > > ## David
> > > 
> > > Le 8 août 2012 à 01:14, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > > 
> > > I've been scratching my head for some time on this one. Major brownie  
> > > points for any guidance:  
> > > I have mapping:  
> > > mapping :show =\> { :properties =\> {...  
> > > :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80,  
> > > :index =\> 'not\_analyzed'},  
> > > ...}}
> > > 
> > > tags is an array of tags. For example:  
> > > "tags":["rails","ruby on rails"]
> > > 
> > > I run a query as such(notice no results):
> > > 
> > > curl -X GET "[http://localhost:9200/magic/\_](http://localhost:9200/magic/_)\*\*  
> > > search?from=0&page=1&per\_page=**24&size=24pretty=true[http://localhost:9200/magic/\_search?from=0&page=1&per\_page=24&size=24pretty=true](http://localhost:9200/magic/_search?from=0&page=1&per_page=24&size=24pretty=true)"  
> > > -d '{"sort":[[{"score":"desc"}]],**"filter":{"terms":{"tags":["**ruby  
> > > on rails"]}},"size":24,"from":0}'**  
> > > {  
> > > "took" : 0,  
> > > "timed\_out" : false,  
> > > "\_shards" : {  
> > > "total" : 5,  
> > > "successful" : 5,  
> > > "failed" : 0  
> > > },  
> > > "hits" : {  
> > > "total" : 0,  
> > > "max\_score" : null,  
> > > "hits" :   
> > > }
> > > 
> > > If I run it with "tags":["ruby"], it will match all documents that are  
> > > tagged "ruby" and all documents tagged "ruby on rails". I don't want a  
> > > substring search, I need an exact search and I thought if the field is  
> > > "not\_analyzed" that it would be an exact match. How to do this the  
> > > right way. Notice that this is a filter and not query.
> 
> --  
> Bashir Eghbali
> 
> [bashireghbali.com](http://bashireghbali.com)  
> linkedin [http://www.linkedin.com/in/bashireghbali](http://www.linkedin.com/in/bashireghbali)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 8, 2012, 9:34pm UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/9 "2012-08-08T21:34:35Z")

</div>

I think it's correct. What are the results now?

--

Le 8 août 2012 à 23:28, Bashir Eghbali [bashir@gmail.com](mailto:bashir@gmail.com) a écrit :

> that is how I've had my mapping, here is my mapping:  
> :magic =\> { :properties =\> {  
> :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index =\> 'not\_analyzed'},  
> }}
> 
> is this not correct or you are suggesting to get rid of :index\_name and :boost?
> 
> On Wednesday, August 8, 2012 1:08:25 AM UTC-7, David Pilato wrote:  
> Sorry. Replace message by tags.
> 
> --
> 
> Le 8 août 2012 à 10:07, David Pilato [da...@pilato.fr](mailto:da...@pilato.fr) a écrit :
> 
> > Array of string can be considered as a String type.
> > 
> > So create your mapping like this:
> > 
> > $ curl -XPUT '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)' -d '  
> > {  
> > "yourtype" : {  
> > "properties" : {  
> > "message" : {"type" : "string", "index" : "not\_analyzed"}  
> > }  
> > }  
> > }  
> > '
> > 
> > --
> > 
> > Le 8 août 2012 à 10:01, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > 
> > > If the mapping was not applied, I would venture that no search would work. Search works in general just returns superset of data or no data on tags with spaces.  
> > > I am not sure what the mapping should look like for the type as there is no explicit array type in elasticsearch. should I be configuring the index with a different type/structure? it seems to show the type that was configured right now which is string.
> > > 
> > > thanks,  
> > > Bashir
> > > 
> > > On Wed, Aug 8, 2012 at 12:03 AM, David Pilato [da...@pilato.fr](mailto:da...@pilato.fr) wrote:  
> > > So, you can see that your mapping is not applied.  
> > > Remove your index magic and create it again.  
> > > Send the mapping  
> > > Verify that your mapping is correct  
> > > And only if correct, send your document and run your query again. It should work.
> > > 
> > > HTH  
> > > David
> > > 
> > > --
> > > 
> > > Le 8 août 2012 à 04:07, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > > 
> > > > I get:  
> > > > "tags":{"type":"string"}
> > > > 
> > > > It says type string but when I assign to tags at indexing time, I pass in an array of strings. I assume it handles the json array fine.
> > > > 
> > > > I tried term filter as well to no avail.
> > > > 
> > > > Any other ideas? does the terms query get tokenized at query time and then matched against a verbatim indexed field, resulting in prefix match?
> > > > 
> > > > On Tuesday, August 7, 2012 5:55:00 PM UTC-7, David Pilato wrote:  
> > > > Are you sure that your mapping is applied?  
> > > > What do you see when doing:  
> > > > curl -XGET '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)'  
> > > > also, did you try with Term filter instead of terms filter? Same result I suppose.
> > > > 
> > > > ## David
> > > > 
> > > > Le 8 août 2012 à 01:14, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > > > 
> > > > > I've been scratching my head for some time on this one. Major brownie points for any guidance:  
> > > > > I have mapping:  
> > > > > mapping :show =\> { :properties =\> {...  
> > > > > :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index =\> 'not\_analyzed'},  
> > > > > ...}}
> > > > > 
> > > > > tags is an array of tags. For example:  
> > > > > "tags":["rails","ruby on rails"]
> > > > > 
> > > > > I run a query as such(notice no results):
> > > > > 
> > > > > curl -X GET "[http://localhost:9200/magic/\_search?from=0&page=1&per\_page=24&size=24pretty=true](http://localhost:9200/magic/_search?from=0&page=1&per_page=24&size=24pretty=true)" -d '{"sort":[[{"score":"desc"}]],"filter":{"terms":{"tags":["ruby on rails"]}},"size":24,"from":0}'  
> > > > > {  
> > > > > "took" : 0,  
> > > > > "timed\_out" : false,  
> > > > > "\_shards" : {  
> > > > > "total" : 5,  
> > > > > "successful" : 5,  
> > > > > "failed" : 0  
> > > > > },  
> > > > > "hits" : {  
> > > > > "total" : 0,  
> > > > > "max\_score" : null,  
> > > > > "hits" :   
> > > > > }
> > > > > 
> > > > > If I run it with "tags":["ruby"], it will match all documents that are tagged "ruby" and all documents tagged "ruby on rails". I don't want a substring search, I need an exact search and I thought if the field is "not\_analyzed" that it would be an exact match. How to do this the right way. Notice that this is a filter and not query.
> > > 
> > > --  
> > > Bashir Eghbali
> > > 
> > > [bashireghbali.com](http://bashireghbali.com)  
> > > linkedin

---

<div class="post-metadata">

**Author:** ![bashir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bashir/32/2780_2.png) [@bashir](https://discuss.elastic.co/u/bashir)\
**Post date:** [August 8, 2012, 10:46pm UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/10 "2012-08-08T22:46:34Z")

</div>

same results, still "ruby on rails" returns no results whereas "ruby"  
returns items tagged "ruby" or "ruby on rails". It seems like the tag  
search is a prefix search namely if I have a tag "rails is great" and I  
search for everything tagged "rails" it will return that article whereas I  
want it to only return the article when I search for the tag "rails is  
great". It factors in whitespace if I search for "ruby " (notice the space  
after) it will return no documents. But if I search for "ruby" it will  
match both "ruby" and "ruby on rails" which leads me to believe that the  
index is tonkenized. Does the boost cause tokenization? not sure how boost  
is implemented in lucene. Also specifying an index\_name, does that cause  
the index to be analyzed thus overwriting what's specified?

thanks,  
bashir

On Wed, Aug 8, 2012 at 2:34 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> I think it's correct. What are the results now?
> 
> --
> 
> Le 8 août 2012 à 23:28, Bashir Eghbali [bashir@gmail.com](mailto:bashir@gmail.com) a écrit :
> 
> that is how I've had my mapping, here is my mapping:  
> :magic =\> { :properties =\> {  
> :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80,  
> :index =\> 'not\_analyzed'},  
> }}
> 
> is this not correct or you are suggesting to get rid of :index\_name and  
> :boost?
> 
> On Wednesday, August 8, 2012 1:08:25 AM UTC-7, David Pilato wrote:
> 
> > Sorry. Replace message by tags.
> > 
> > --
> > 
> > Le 8 août 2012 à 10:07, David Pilato [da...@pilato.fr](mailto:da...@pilato.fr) a écrit :
> > 
> > Array of string can be considered as a String type.
> > 
> > So create your mapping like this:
> > 
> > $ curl -XPUT '[http://localhost:9200/magic/\*\*yourtype/\_mapping](http://localhost:9200/magic/**yourtype/_mapping)' [http://localhost:9200/magic/yourtype/\_mapping'](http://localhost:9200/magic/yourtype/_mapping') -d '  
> > {  
> > "yourtype" : {  
> > "properties" : {  
> > "message" : {"type" : "string", "index" : "not\_analyzed"}  
> > }  
> > }  
> > }  
> > '
> > 
> > --
> > 
> > Le 8 août 2012 à 10:01, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > 
> > If the mapping was not applied, I would venture that no search would  
> > work. Search works in general just returns superset of data or no data on  
> > tags with spaces.  
> > I am not sure what the mapping should look like for the type as there is  
> > no explicit array type in elasticsearch. should I be configuring the index  
> > with a different type/structure? it seems to show the type that was  
> > configured right now which is string.
> > 
> > thanks,  
> > Bashir
> > 
> > On Wed, Aug 8, 2012 at 12:03 AM, David Pilato [da...@pilato.fr](mailto:da...@pilato.fr) wrote:
> > 
> > > So, you can see that your mapping is not applied.  
> > > Remove your index magic and create it again.  
> > > Send the mapping  
> > > Verify that your mapping is correct  
> > > And only if correct, send your document and run your query again. It  
> > > should work.
> > > 
> > > HTH  
> > > David
> > > 
> > > --
> > > 
> > > Le 8 août 2012 à 04:07, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > > 
> > > I get:  
> > > "tags":{"type":"string"}
> > > 
> > > It says type string but when I assign to tags at indexing time, I pass  
> > > in an array of strings. I assume it handles the json array fine.
> > > 
> > > I tried term filter as well to no avail.
> > > 
> > > Any other ideas? does the terms query get tokenized at query time and  
> > > then matched against a verbatim indexed field, resulting in prefix match?
> > > 
> > > On Tuesday, August 7, 2012 5:55:00 PM UTC-7, David Pilato wrote:
> > > 
> > > > Are you sure that your mapping is applied?  
> > > > What do you see when doing:
> > > > 
> > > > curl -XGET '[http://localhost:9200/magic/\*\*y\*\*ourtype/\_mapping](http://localhost:9200/magic/ **y** ourtype/_mapping)' [http://localhost:9200/magic/yourtype/\_mapping'](http://localhost:9200/magic/yourtype/_mapping')
> > > > 
> > > > also, did you try with Term filter instead of terms filter? Same result  
> > > > I suppose.
> > > > 
> > > > ## David
> > > > 
> > > > Le 8 août 2012 à 01:14, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > > > 
> > > > I've been scratching my head for some time on this one. Major brownie  
> > > > points for any guidance:  
> > > > I have mapping:  
> > > > mapping :show =\> { :properties =\> {...  
> > > > :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80,  
> > > > :index =\> 'not\_analyzed'},  
> > > > ...}}
> > > > 
> > > > tags is an array of tags. For example:  
> > > > "tags":["rails","ruby on rails"]
> > > > 
> > > > I run a query as such(notice no results):
> > > > 
> > > > curl -X GET "[http://localhost:9200/magic/\_](http://localhost:9200/magic/_)\*\*\*\*  
> > > > search?from=0&page=1&per\_page=**24&size=24pretty=true[http://localhost:9200/magic/\_search?from=0&page=1&per\_page=24&size=24pretty=true](http://localhost:9200/magic/_search?from=0&page=1&per_page=24&size=24pretty=true)"  
> > > > -d '{"sort":[[{"score":"desc"}]],**"filter":{"terms":{"tags":["**ru**by  
> > > > on rails"]}},"size":24,"from":0}'\*\*\*\*  
> > > > {  
> > > > "took" : 0,  
> > > > "timed\_out" : false,  
> > > > "\_shards" : {  
> > > > "total" : 5,  
> > > > "successful" : 5,  
> > > > "failed" : 0  
> > > > },  
> > > > "hits" : {  
> > > > "total" : 0,  
> > > > "max\_score" : null,  
> > > > "hits" :   
> > > > }
> > > > 
> > > > If I run it with "tags":["ruby"], it will match all documents that are  
> > > > tagged "ruby" and all documents tagged "ruby on rails". I don't want a  
> > > > substring search, I need an exact search and I thought if the field is  
> > > > "not\_analyzed" that it would be an exact match. How to do this the  
> > > > right way. Notice that this is a filter and not query.
> > 
> > --  
> > Bashir Eghbali
> > 
> > [bashireghbali.com](http://bashireghbali.com)  
> > linkedin [http://www.linkedin.com/in/bashireghbali](http://www.linkedin.com/in/bashireghbali)

--  
Bashir Eghbali

[bashireghbali.com](http://bashireghbali.com)  
linkedin [http://www.linkedin.com/in/bashireghbali](http://www.linkedin.com/in/bashireghbali)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 9, 2012, 5:05am UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/11 "2012-08-09T05:05:53Z")

</div>

Could you create a full curl recreation and gist it?  
See [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help/)

--

Le 9 août 2012 à 00:46, Bashir Eghbali [bashir@gmail.com](mailto:bashir@gmail.com) a écrit :

> same results, still "ruby on rails" returns no results whereas "ruby" returns items tagged "ruby" or "ruby on rails". It seems like the tag search is a prefix search namely if I have a tag "rails is great" and I search for everything tagged "rails" it will return that article whereas I want it to only return the article when I search for the tag "rails is great". It factors in whitespace if I search for "ruby " (notice the space after) it will return no documents. But if I search for "ruby" it will match both "ruby" and "ruby on rails" which leads me to believe that the index is tonkenized. Does the boost cause tokenization? not sure how boost is implemented in lucene. Also specifying an index\_name, does that cause the index to be analyzed thus overwriting what's specified?
> 
> thanks,  
> bashir
> 
> On Wed, Aug 8, 2012 at 2:34 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
> I think it's correct. What are the results now?
> 
> --
> 
> Le 8 août 2012 à 23:28, Bashir Eghbali [bashir@gmail.com](mailto:bashir@gmail.com) a écrit :
> 
> > that is how I've had my mapping, here is my mapping:  
> > :magic =\> { :properties =\> {  
> > :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index =\> 'not\_analyzed'},  
> > }}
> > 
> > is this not correct or you are suggesting to get rid of :index\_name and :boost?
> > 
> > On Wednesday, August 8, 2012 1:08:25 AM UTC-7, David Pilato wrote:  
> > Sorry. Replace message by tags.
> > 
> > --
> > 
> > Le 8 août 2012 à 10:07, David Pilato [da...@pilato.fr](mailto:da...@pilato.fr) a écrit :
> > 
> > > Array of string can be considered as a String type.
> > > 
> > > So create your mapping like this:
> > > 
> > > $ curl -XPUT '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)' -d '  
> > > {  
> > > "yourtype" : {  
> > > "properties" : {  
> > > "message" : {"type" : "string", "index" : "not\_analyzed"}  
> > > }  
> > > }  
> > > }  
> > > '
> > > 
> > > --
> > > 
> > > Le 8 août 2012 à 10:01, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > > 
> > > > If the mapping was not applied, I would venture that no search would work. Search works in general just returns superset of data or no data on tags with spaces.  
> > > > I am not sure what the mapping should look like for the type as there is no explicit array type in elasticsearch. should I be configuring the index with a different type/structure? it seems to show the type that was configured right now which is string.
> > > > 
> > > > thanks,  
> > > > Bashir
> > > > 
> > > > On Wed, Aug 8, 2012 at 12:03 AM, David Pilato [da...@pilato.fr](mailto:da...@pilato.fr) wrote:  
> > > > So, you can see that your mapping is not applied.  
> > > > Remove your index magic and create it again.  
> > > > Send the mapping  
> > > > Verify that your mapping is correct  
> > > > And only if correct, send your document and run your query again. It should work.
> > > > 
> > > > HTH  
> > > > David
> > > > 
> > > > --
> > > > 
> > > > Le 8 août 2012 à 04:07, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > > > 
> > > > > I get:  
> > > > > "tags":{"type":"string"}
> > > > > 
> > > > > It says type string but when I assign to tags at indexing time, I pass in an array of strings. I assume it handles the json array fine.
> > > > > 
> > > > > I tried term filter as well to no avail.
> > > > > 
> > > > > Any other ideas? does the terms query get tokenized at query time and then matched against a verbatim indexed field, resulting in prefix match?
> > > > > 
> > > > > On Tuesday, August 7, 2012 5:55:00 PM UTC-7, David Pilato wrote:  
> > > > > Are you sure that your mapping is applied?  
> > > > > What do you see when doing:  
> > > > > curl -XGET '[http://localhost:9200/magic/yourtype/\_mapping](http://localhost:9200/magic/yourtype/_mapping)'  
> > > > > also, did you try with Term filter instead of terms filter? Same result I suppose.
> > > > > 
> > > > > ## David
> > > > > 
> > > > > Le 8 août 2012 à 01:14, Bashir Eghbali [bas...@gmail.com](mailto:bas...@gmail.com) a écrit :
> > > > > 
> > > > > > I've been scratching my head for some time on this one. Major brownie points for any guidance:  
> > > > > > I have mapping:  
> > > > > > mapping :show =\> { :properties =\> {...  
> > > > > > :tags =\> {:type =\> 'string', :index\_name =\> 'tag', :boost =\> 80, :index =\> 'not\_analyzed'},  
> > > > > > ...}}
> > > > > > 
> > > > > > tags is an array of tags. For example:  
> > > > > > "tags":["rails","ruby on rails"]
> > > > > > 
> > > > > > I run a query as such(notice no results):
> > > > > > 
> > > > > > curl -X GET "[http://localhost:9200/magic/\_search?from=0&page=1&per\_page=24&size=24pretty=true](http://localhost:9200/magic/_search?from=0&page=1&per_page=24&size=24pretty=true)" -d '{"sort":[[{"score":"desc"}]],"filter":{"terms":{"tags":["ruby on rails"]}},"size":24,"from":0}'  
> > > > > > {  
> > > > > > "took" : 0,  
> > > > > > "timed\_out" : false,  
> > > > > > "\_shards" : {  
> > > > > > "total" : 5,  
> > > > > > "successful" : 5,  
> > > > > > "failed" : 0  
> > > > > > },  
> > > > > > "hits" : {  
> > > > > > "total" : 0,  
> > > > > > "max\_score" : null,  
> > > > > > "hits" :   
> > > > > > }
> > > > > > 
> > > > > > If I run it with "tags":["ruby"], it will match all documents that are tagged "ruby" and all documents tagged "ruby on rails". I don't want a substring search, I need an exact search and I thought if the field is "not\_analyzed" that it would be an exact match. How to do this the right way. Notice that this is a filter and not query.
> > > > 
> > > > --  
> > > > Bashir Eghbali
> > > > 
> > > > [bashireghbali.com](http://bashireghbali.com)  
> > > > linkedin
> 
> --  
> Bashir Eghbali
> 
> [bashireghbali.com](http://bashireghbali.com)  
> linkedin

---

<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:** [July 6, 2017, 3:17am UTC](https://discuss.elastic.co/t/filter-on-not-analyzed-field-with-whitespace-hyphen-not-working/8662/12 "2017-07-06T03:17:01Z")

</div>


