Could not find value with minus

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?

Please format your code using </> icon as explained in this guide. 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.

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