# Filter in ElasticSearch in Discover page

**URL:** <https://discuss.elastic.co/t/filter-in-elasticsearch-in-discover-page/39152>\
**Category:** Elasticsearch\
**Created:** [January 13, 2016, 6:59pm UTC](https://discuss.elastic.co/t/filter-in-elasticsearch-in-discover-page/39152 "2016-01-13T18:59:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pittoch](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@pittoch](https://discuss.elastic.co/u/pittoch)\
**Post date:** [January 13, 2016, 6:59pm UTC](https://discuss.elastic.co/t/filter-in-elasticsearch-in-discover-page/39152/1 "2016-01-13T18:59:38Z")

</div>

Hi

I search to add a filter in ElasticSearch.

When I search ????, the filter doesn't

{  
"filtered": {  
"query": {  
"match": { "MACOLONNE": "????" }  
}  
}

When I add a filter to find the string ???? it does not fuction. The character "?" seems to be a special character. I tried to escape characters with a \ , but I have an error.  
Do you know I can do that ?

I have a second question, I need to search not null query.

Exemple: (I had NOT, but it is not authorized:

{  
"filtered": {  
"query": {  
"match NOT ": { "MACOLONNE": "" }  
}  
}

Thank you!

---

<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:** [January 13, 2016, 7:33pm UTC](https://discuss.elastic.co/t/filter-in-elasticsearch-in-discover-page/39152/2 "2016-01-13T19:33:21Z")

</div>

It's a matter of analyzer I think.

With the default analyzer, `?` is ignored (at index and query time).

So I'd change the analyzer.

About Not, you should use a bool query with `must_not` clause. See [https://www.elastic.co/guide/en/elasticsearch/reference/2.1/query-dsl-bool-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.1/query-dsl-bool-query.html)

---

<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 5, 2017, 11:24pm UTC](https://discuss.elastic.co/t/filter-in-elasticsearch-in-discover-page/39152/3 "2017-07-05T23:24:50Z")

</div>


