Skip to content

Instantly share code, notes, and snippets.

@TomonoriSoejima
Last active November 6, 2020 12:25
Show Gist options
  • Save TomonoriSoejima/69ac318c3c8c2212a49f22df93832d98 to your computer and use it in GitHub Desktop.
Save TomonoriSoejima/69ac318c3c8c2212a49f22df93832d98 to your computer and use it in GitHub Desktop.
look for escape character
DELETE test4

PUT /test4
{
  "mappings": {
    "test": {
      "properties": {
        "name": {
          "type": "text",
          "analyzer": "whitespace"
        }
      }
    }
  }
}

PUT test4/test/1
{
  "name" : "hi\\you"
}

PUT test4/test/2
{
  "name" : "\\"
}


GET test4/_search
{
  "query": {
    "match": {
      "name": "\\"
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment