Search for a negative value

I have indexed fields containing character codes such as 3 1 1 and 3 1 -1.
But when I search 3 1 -1 it seems that the "-" is not supported!
could you please help me?

GET /_search
{
    "query": {
        "match_phrase" : {
            "champ" : "3 1 -1"
        }
    }
}

That is really an elasticsearch question rather than a logstash question and you might get a better answer if you moved the question to that forum.

That said, I think the standard tokenizer would remove the - from the -1, so the -1 is indexed as if it were 1 and so you cannot search for -1

1 Like

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