# Could not find value with minus

**URL:** <https://discuss.elastic.co/t/could-not-find-value-with-minus/82846>\
**Category:** Elasticsearch\
**Created:** [April 19, 2017, 9:02am UTC](https://discuss.elastic.co/t/could-not-find-value-with-minus/82846 "2017-04-19T09:02:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rolandgolla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rolandgolla/32/17491_2.png) [@rolandgolla](https://discuss.elastic.co/u/rolandgolla)\
**Post date:** [April 19, 2017, 9:02am UTC](https://discuss.elastic.co/t/could-not-find-value-with-minus/82846/1 "2017-04-19T09:02:54Z")

</div>

Hi,

i try to search

```
GET /myindex/product/_search

```

{  
"size": 10000,  
"query" : {  
"match" : {  
"identvalue" : "xy-02-00027"  
}  
}

}

But the result is all items. Then i only search for "test001" everything works. Also when i search for xy0200027. Do i have to escape the minus?

---

<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:** [April 19, 2017, 9:43am UTC](https://discuss.elastic.co/t/could-not-find-value-with-minus/82846/2 "2017-04-19T09:43:38Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

It's probably because you are using a default analyzer which breaks your text into tokens like `xy`, `02`, `00027`.

BTW don't set size to 10000 unless you really know why you are doing that.

---

<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:** [May 17, 2017, 9:56am UTC](https://discuss.elastic.co/t/could-not-find-value-with-minus/82846/3 "2017-05-17T09:56:25Z")

</div>

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