ElasticSearch parsing special characters


#1

I've problem with parsing pipe "|" character in elastic. When a record have any special characters no result data.

{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "username": "john|doe@group.net"
          }
        }
      ],
      "must_not": [],
      "should": []
    }
  },

Only when I get rid of second element including "|" , when "username": "john" , the results is okay.


(David Pilato) #2

Depends on the analyzer you are using here.


#3

I tried by uax_url_email, but no working


(David Pilato) #4

Try with keyword analyzer


#5

I've Es 2.4, it tourned out put"type":"phrase", now its ok. Thanks


(system) #6

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