Finding exact value with hyphen on not analyzed field is not working

(asmierzchalski) #1

Hello together,

i'm using Logstash in combination with ElasticSearch. I have a field from type String which is not_analyzed. The values are containing hyphens. When i'm trying to filter with a term for this field and that value i'm not getting any results.

After reading i guess this should be possible. I tried the example from this answer and it's working, so i'm not sure where the problem with the index from Logstash or my Filter is.

Field description in the index:

My filter query:
curl -XGET http://localhost:9200/_all/_search -d '{
"filter" : {
"term" : {
"objectId" : "8c9a3c20-744e-44d7-8467-621a9b461002"

(asmierzchalski) #2

I've found the solution myself. Logstash provides the fields analyzed and not_analyzed in the .raw field.
So i only have to query the objectId.raw field.

(system) closed #3