0

I've problem with parsing pipe "|" character in elasticsearch. When record have any special characters no result data. Below my query

{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "username": "john|[email protected]"
          }
        }
      ],
      "must_not": [],
      "should": []
    }
  }, 

I tried use "tokenizer":"uax_url_email", but not working

M. Badovsky
  • 99
  • 3
  • 10

1 Answers1

1

try with query_string ,Its working .I have tested in my system with default standard analyzer Try to Use query_string . Its very powerful in partial search in ES ,check my answer link :-

:-

{ 

  "query": {
    "query_string": {
       "fields" : ["username"] ,
      "query": "john|[email protected]"
    }
  }
}
Community
  • 1
  • 1
Vijay
  • 4,694
  • 1
  • 30
  • 38