Skip to content

Instantly share code, notes, and snippets.

@hkulekci
Last active April 26, 2019 12:32
Show Gist options
  • Save hkulekci/c226c84d2c5cc4c65fac83ae98fc69a3 to your computer and use it in GitHub Desktop.
Save hkulekci/c226c84d2c5cc4c65fac83ae98fc69a3 to your computer and use it in GitHub Desktop.
Standard Analyzer Weird Result
########

GET _analyze
{
  "text": ["document.txt"], 
  "analyzer": "standard"
}

{
  "tokens": [
    {
      "token": "document.txt",
      "start_offset": 0,
      "end_offset": 12,
      "type": "<ALPHANUM>",
      "position": 0
    }
  ]
}


#########


GET _analyze
{
  "text": ["document1.txt"], 
  "analyzer": "standard"
}

{
  "tokens": [
    {
      "token": "document1",
      "start_offset": 0,
      "end_offset": 9,
      "type": "<ALPHANUM>",
      "position": 0
    },
    {
      "token": "txt",
      "start_offset": 10,
      "end_offset": 13,
      "type": "<ALPHANUM>",
      "position": 1
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment