Comparing standard vs folding analyzer

Mapping

PUT /my_index/_mapping/my_type
{
  "properties": {
    "title": { 
      "type":           "string",
      "analyzer":       "standard",
      "fields": {
        "folded": { 
          "type":       "string",
          "analyzer":   "folding"
        }
      }
    }
  }
}

Analysing: title.folded

GET /my_normal/_analyze
{ 
  "field": "{title.folded}", 
  "text": "Esta está loca"
}

Analysing title:

GET /my_normal/_analyze
{ 
  "field": "{title}", 
  "text": "Esta está loca"
}

Output:

{
  "tokens": [
    {
      "token": "esta",
      "start_offset": 0,
      "end_offset": 4,
      "type": "<ALPHANUM>",
      "position": 0
    },
    {
      "token": "está",
      "start_offset": 5,
      "end_offset": 9,
      "type": "<ALPHANUM>",
      "position": 1
    },
    {
      "token": "loca",
      "start_offset": 10,
      "end_offset": 14,
      "type": "<ALPHANUM>",
      "position": 2
    }
  ]
}

Hi,
Can someone please explain me why I am getting same output for both the case

What do you have for folding analyzer?

BTW I believe the field name should be:

GET /my_normal/_analyze
{ 
  "field": "title", 
  "text": "Esta está loca"
}

Thanks for responding @dadoonet
I am using same text for both standard as well as folding analyzer
"Esta está loca"
I just wanted to know the difference between standard and folding analyzer

I can't see the folding analyzer in https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-analyzers.html

So how did you define the folding analyzer?

In case it's what you are looking for here is a link related to this: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/analysis-asciifolding-tokenfilter.html

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